SolutionCottage.com
Posted  10 Mar 2009 - 15:53:15

Category: ASP.net


Make a readonly field in Dynamic Data

Issue:
You want to make a field readonly when using Dynamic Data. You have noted that the [Readonly(true)] attribute is not working.

Solution:
The status of the Readonly attribute is not known at this point, it might be fixed already. The workaround is to add a new Field Template that only contains a Label instead of the default TextBox. When this is done, you can UIHint your field to this new Field Template. See the discussion at:

http://forums.asp.net/t/1375123.aspx








0 comments:








© SolutionCottage 2008-2011 9/26/2017 10:19:26 AM