.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Imran Ghani
Sohaib Khalid

Home >> Code Snippets >> ASP.NET Controls >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Not to allow special characters in cell no textbox

Posted By:Syed Shakeer Hussain       Posted Date: February 16, 2009    Points: 10    Category: ASP.NET Controls    URL: http://www.dotnetspark.com  

The below code is useful when you don't want to enter any special characters in a cellNo textbox..

1.First select your TextBox and click on Events.

2.Next select and double click on Keypress event and write below code ..
Private void textbox1_KeyPress(object sender,EventArgs e) 
3.if you want to work a BackSpace Key write above code




Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend