Last post May 10, 2013 01:55 PM by Rion Williams
May 07, 2013 12:01 AM|sreethi|LINK
I have the following dynamic control.
<asp:DynamicControl ID="DynamicControl1" runat="server" DataField="Label" UIHint="Text_Edit" />
The maxlength for this is was intially set to 255 in database as well as in .edmx file.
<Property Name="Label" Type="nvarchar" Nullable="false" MaxLength="255" />(.edmx file).
So the Label textbox was allowing me to enter only 255 characters. When I tried entering more than 255 characters it was cut off.(which is perfect).
Now, I want to increase the MaxLength of the 'Label' text box to 555. I changed the column length in database to 555. Also the edmx file has label MaxLength set to 555.
<Property Name="Label" Type="nvarchar" Nullable="false" MaxLength="555" />(.edmx file).
But it still allows only 255 characters. How can I increase this? I am missing something obvious? Please help.
May 07, 2013 05:39 AM|hyder92|LINK
as you told that you have increased length of field in database and also textbox but you have not updated entity frame work data model so you update your table in datamodel than it works fine.
May 10, 2013 12:31 PM|sjnaughton|LINK
You need to edit the Text_Edit field template in the ~/DynamicData/FiedlTemplates folder.
May 10, 2013 01:55 PM|Rion Williams|LINK
Have you tried clearing the cache within your browser to ensure that the latest code is being pulled?
If the only change that was made to your actual client-side code was to your MaxLength property, then I would assume that the issue could stem from a cached copy being loaded instead of the newest version. (Ensure these changes are made in all of the
appropriate areas as well, you may even consider searching for "255" so that you avoid missing any of them.)