MVC3 - posting byte array to a controller - Database RowVersion

前端 未结 2 1080
南笙
南笙 2020-12-30 22:00

I am working on an MVC3 application. My client side ViewModel contains a SQL Server RowVersion property, which is a byte[]. It is rendered as an Object array on the client

2条回答
  •  说谎
    说谎 (楼主)
    2020-12-30 23:04

    My client side ViewModel contains a SQL Server RowVersion property, which is a byte[]

    Make it so that instead of a byte[] your view model contains a string property which is the base64 representation of this byte[]. Then you won't have any problems roundtripping it to the client and back to the server where you will be able to get the original byte[] from the Base64 string.

提交回复
热议问题