Hey,
I'm working on a query where I only want to use the 8 first characters entered in to the textbox. Is there some attribute to textbox that allows me to do this?
Thanks for your time.
Printable View
Hey,
I'm working on a query where I only want to use the 8 first characters entered in to the textbox. Is there some attribute to textbox that allows me to do this?
Thanks for your time.
you want to limit textbox characters to 8 max, or you need to parse first 8 characters from it?
explain a bit more please
If you don't want to limit the textbox content size you can simply use substring
will return the first 8 characters of your textbox. Make sure that your textbox contains at least 8 characters before calling the substring if you don't want an exception to be thrown.vb.net Code:
textbox1.text.substring(0,8)
I need the user to be able to type into the textbox, for instance: "3334445554422",
but I only want to use "33344455". I can't limit the textbox, because it's necessary for them to type in the whole number. I wish the was like a textbox1.text(limit=8) function..
Thank you for replying!
Ah, okay! Thanks, stlaural!