One of the few fields that have their ReadOnly property equal to True then Edit and Update the value field is empty ReadOnly property is recorded. I also have a ReadOnl开发者_开发技巧y property and its value is not empty. (GridView to the SqlDataSource is connected) How to solve this problem?
If you do not wish to update this value, remove it from your UpdateCommand on your asp:SqlDataSource.
If you wish to get this value on your update command you need to included it on
<asp:SqlDataSource ...
<UpdateParameters>
<asp:Parameter Name="YourFieldName" Type="Bool" />
...
</UpdateParameters>
The ReadOnly field is just say that when you go to edit mode, for this field is not change to control for give the opportunity to change, but the values on SqlDataSource is not affected by this readonly flag.
精彩评论