Extending the Textbox Control in ASP.Net using C#
-
Hi, I want to create a custom textbox control in ASP.Net using C#, which extends the properties of the normal textbox control and it only allows numeric, alphabetic and alphanumeric characters depending upon the users choice. It should have a built-in client side validation for the same. Also, it should have a property called required, which when set to true, the text box also shows the property of the required field validator.
-----Have A Nice Day-----
-
Hi, I want to create a custom textbox control in ASP.Net using C#, which extends the properties of the normal textbox control and it only allows numeric, alphabetic and alphanumeric characters depending upon the users choice. It should have a built-in client side validation for the same. Also, it should have a property called required, which when set to true, the text box also shows the property of the required field validator.
-----Have A Nice Day-----
What have you done so far? Anything?
Mark, http://aspnetlibrary.com
-
What have you done so far? Anything?
Mark, http://aspnetlibrary.com
-
Yes, I tried and found out that I would need to override the OnKeyPress method to track the keys and show the messages correspondingly, but, this OnKeyPress method is for Windows forms and I want it for Web.
-----Have A Nice Day-----
JavaScript also has an onkeypress method that you can use for the client side validation.
Mark, http://aspnetlibrary.com
-
JavaScript also has an onkeypress method that you can use for the client side validation.
Mark, http://aspnetlibrary.com
-
I want the textbox to do everything as a custom control, so that whenever the textbox is used in any form in any project, no code needs to be written anywhere for it.
-----Have A Nice Day-----
It will if you extend the control as it will inherit all of it's properties and methods.
Mark, http://aspnetlibrary.com
-
Hi, I want to create a custom textbox control in ASP.Net using C#, which extends the properties of the normal textbox control and it only allows numeric, alphabetic and alphanumeric characters depending upon the users choice. It should have a built-in client side validation for the same. Also, it should have a property called required, which when set to true, the text box also shows the property of the required field validator.
-----Have A Nice Day-----
I think in web you can't handle keypress event on server without a postback
string Cheers = "Navaneeth!!" www.w3hearts.com