TextBox Control
-
Heyas all, Is it possible, using the .NET framework, to programmatically determine if there is text in a textbox control or not. Say just a simple Bool value or something similiar. Basically I'm trying to build a query string dependant on what textboxes have text in them, if a textbox has text then include that text in the query if not, ignore completely. Is this possible or should I be going a completely different route? Thanks, John
-
Heyas all, Is it possible, using the .NET framework, to programmatically determine if there is text in a textbox control or not. Say just a simple Bool value or something similiar. Basically I'm trying to build a query string dependant on what textboxes have text in them, if a textbox has text then include that text in the query if not, ignore completely. Is this possible or should I be going a completely different route? Thanks, John
-
Whatever textbox control you are talking about (web, windows or mobile), it has a Text property that you can use to get the text in the textbox. Simply check if the length of the string is zero or not. --- b { font-weight: normal; }
That would work perfectly, thanks a lot guffa :) Thanks, John
-
Whatever textbox control you are talking about (web, windows or mobile), it has a Text property that you can use to get the text in the textbox. Simply check if the length of the string is zero or not. --- b { font-weight: normal; }
Or simply check that the TextLength property is greater than zero. -- I've killed again, haven't I?
-
Heyas all, Is it possible, using the .NET framework, to programmatically determine if there is text in a textbox control or not. Say just a simple Bool value or something similiar. Basically I'm trying to build a query string dependant on what textboxes have text in them, if a textbox has text then include that text in the query if not, ignore completely. Is this possible or should I be going a completely different route? Thanks, John
TextBox1.Text.Equals("") may solve it or use TextBox1.Text.Length "Aim to go where U have never been B4 and Strive to achieve it" http://groups.yahoo.com/subscribe/dotnetforfreshres http://himabinduvejella.blogspot.com