I have a detail view control in my aspx form.
I have the following field in my detail view:
NameId
Name
ContactNo
But i dont want to allow the user to edit the “NameId” field.
So i set it as READ ONLY and INSERT VISIBLE.
But setting it dosent allow me to update.
If all the fields are set to be allow for editing, the update work successfully.
How should i go about doing it?
Are you trying to pass that NameID field in the
UpdateCommand?Setting the field to
ReadOnly=Truewon’t pass the value to the underlying datasource. So you may need to remove that field from theUpdateCommand.See this link for some more information:
http://weblogs.asp.net/istofix/archive/2008/12/31/tips-amp-tricks-details-view-and-read-only-fields.aspx