Can I set max length of Text Area in Asp.Net -


                                    <cc1:xtextbox id="txtgroupdescription" maxlength="250" textmode="multiline" runat="server" cssclass="required">                                 </cc1:xtextbox> 

i have code.when run code , provides input grater 250 programe terminated "string or binary data truncated. statement has been terminated."

the error triggered data base engine, if means column receiving more data can hold (maybe nvarchar), in code behind this:

 txtgroupdescription.text.length>250 throw new exception("only 250 characters"); 

i'm pretty sure column has 250 characters.


Comments