Characters before @
-
I have for e.g saurabh@yahoo.com in Textbox i only want characters before @ i.e saurabh. What should be the property for textbox to do this..?
-
I have for e.g saurabh@yahoo.com in Textbox i only want characters before @ i.e saurabh. What should be the property for textbox to do this..?
The Text property gives you the string. IT's a string, it has methods for finding characters. Or you can use a RegEx, if you want, but it's not needed to just find the @. I'd use the split method for that.
Christian Graus Driven to the arms of OSX by Vista.
-
The Text property gives you the string. IT's a string, it has methods for finding characters. Or you can use a RegEx, if you want, but it's not needed to just find the @. I'd use the split method for that.
Christian Graus Driven to the arms of OSX by Vista.
Sorry i dint get your ans can u describe me using some example..!!
-
I have for e.g saurabh@yahoo.com in Textbox i only want characters before @ i.e saurabh. What should be the property for textbox to do this..?
-
I have for e.g saurabh@yahoo.com in Textbox i only want characters before @ i.e saurabh. What should be the property for textbox to do this..?
saurabh mohal wrote:
I have for e.g saurabh@yahoo.com in Textbox i only want characters before @ i.e saurabh. What should be the property for textbox to do this..?
I didn't get your point.:confused: You want something MaskedTextbox (in Windows Form)
cheers, Abhijit My Recent Article : Beginner's Guide to ASP.NET Application Folder
-
Sorry i dint get your ans can u describe me using some example..!!
Christian has already given you the key words to search for "string" and "split" - now you should probably look in your book or google for it.
-
Sorry i dint get your ans can u describe me using some example..!!
If you're incapable of using google or exploring the methods on the string class using intellisense, perhaps the world has lost a janitor without gaining a programmer ?
Christian Graus Driven to the arms of OSX by Vista.
-
I have for e.g saurabh@yahoo.com in Textbox i only want characters before @ i.e saurabh. What should be the property for textbox to do this..?
Well, Christian gived you answer but I will give you too example.
string email = textBoxName.Text.Substring(0,textBoxName.Text.IndexOf("@"));
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post.