Counting from a textbox, asp.net
2 answers
This property to see how long the text is during postback:
TextBox.Text.Length;
TextBox: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.textbox.aspx
Text Property: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.textbox.text.aspx
Line length: http://msdn.microsoft.com/en-us/library/system.string.length.aspx
String str = TextBox.Text;
if(str.Length > 50)
{
str = str.SubString(0, 50) + "<br/>" + str.SubString(50);
}
+8
a source to share