Extending the ASP.NET TextField User Control
(Page 1 of 4 )
This is an extension to the previous article "Developing a Wonderful ASP.NET TextField Control" for supporting numeric features (something like a Numeric Textbox). Before proceeding with this, I strongly suggest that you go through the previous article, as I am using the same core structure as the previous user control.
A
downloadable zip file is available for this application.
The entire solution (source code) for this article is available as a free download (in the form of a zip). The source code in this article has been developed using Microsoft Visual Studio 2005 Professional Edition on Microsoft Windows Server 2003 Standard Edition. I didn't really test any of the code in any other tools/IDEs/servers/editions/versions. If you have any problems, please feel free to post in the discussion area.
I will not be repeating the explanation of user controls in this article as I already introduced the same in my previous article. Along with the introduction, I also developed a sample TextField user control featuring new functions. Now, I would like to extend the same control to support a few more functions.
A textbox which needs to have only numeric input is often required in ASP.NET applications. Numeric input is not only limited to digits. It may also have a decimal point (or period/dot) with decimal places. We may also include commas to separate thousands (say for a value of one billion). We may also want to have Max and Min values for the value being entered. I would like to include all of these features as part of this control.
This control is a superset of my previous control "uctTextField" (developed as part of the previous article). So you need to have "uctTextField.ascx" as part of your solution before proceeding with the new control. Let us start the development now.
Next: Developing your own flexible NumericTextbox control: the beginning >>
More ASP.NET Articles
More By Jagadish Chaterjee