PDA

View Full Version : [CLOSED] Hidden field byte[] as base64



jcarlos
Apr 24, 2014, 7:55 PM
Hi all,

Is there any setting in Ext.Net.MVC that I can force to render a byte[] hidden field (RowVersion) as base64 in order that it can be properly deserialized when the form data is read by the server?
I tried to render the field in the following way, but the value is being rendered improperly as a string containing the text "System.Byte[]"

cshtml:


Html.X().HiddenFor(s => s.MyFieldRowVersion)

rendering:


{id:"MyFieldRowVersion",xtype:"hiddenfield",name:"MyFieldRowVersion",value:"System.Byte[]"}

The goal is to use this field in a concurrent editing handling.

Thanks,

Jose Carlos

Vladimir
Apr 25, 2014, 4:35 AM
There is no such functionality
You have to convert byte array to base64 string manually and set it to Text property of HiddenField.

jcarlos
Apr 25, 2014, 12:17 PM
There is no such functionality
You have to convert bute array to base64 string manually and set it to Text property of HiddenField

Hi Vladimir, I am going to do that, thank you.

Jose Carlos.