Interested in any of our services: Request a call

.Net bug when adding 'MaxLength' attribute to MultiLine Textboxes

Another little hidden feature within .Net for you!

.Net kindly ignores the ‘MaxLength’ attribute for a textbox with it’s ‘TextMode’ set to ‘MultiLine’, if it is set within the frontend files.

Woop! Why I’m not sure, but the simple workaround is to do this within the backend. Personally I choose to do it within the PreRender method.

 

<!-- Omits MaxLength Attribute -->
<asp:TextBox ID="Textbox1" Runat="server" TextMode="MultiLine" MaxLength="500" />

<!-- Fixed via adding MaxLength attribute in Backend code -->
<asp:TextBox ID="Textbox1" Runat="server" TextMode="MultiLine" />

 

// Add MaxLength attribute via code
Textbox1.Attribute.Add("maxlength", "500");

 

That’s all folks! Keeping it nice and simple Wink

Read more about Dave Radley on

Related to .Net bug when adding 'MaxLength' attribute to MultiLine Textboxes

Eclipse Mining

A mine planning/ tracking/ QC/ and reporting package. Used at gold mines in Ghana, Cote d’Ivoire, Eritrea and soon many others.

Bisha Mining

We further developed the Mining Planning Database for a small surface gold mine in Eritrea. Small in the mining World is a startup cost of around $300m and we like to think that we played a part in keeping those costs to a minimum.

INEA Rebuild

A database platform that enables Estate Agents to share and collaborate. What started as a fairly small data sharing application, now has a suite of specialist tools that are all designed to meet the needs of a British Estate Agent - from geo-mapping of properties to automated ‘colour particulars’ and including a range of dedicated email marketing tools that can transform productivity.
The rebuild of the INEA website blends our knowledge of mapping with big data so that agents can share their properties with other members.

Knowledge Base

There is no need to manually upload your data to Rightmove

Rightmove have put back their switch-over date until 31st July 2016 and are telling agents that they'll need to manually upload their property data if they can't supply their data in the Real Time Data Feed format.

Data Visualization Summit

One of the big growth areas in technology is data visualization so we went along to the Data Visualization Summit at the Royal Garden Hotel in London to find out what the Industry Leaders had to say on the matter.