I want to implement the own custom TextBox control in Asp.Net(C#). Please give me some idea and links.
-
1Step ask a question that is more specific.John Saunders– John Saunders2010-01-25 19:50:56 +00:00Commented Jan 25, 2010 at 19:50
-
what do you mean? you want to create a TextBox control from scratch (as a Custom Control)? you have something you want to add to the existing TextBox control?asbestossupply– asbestossupply2010-01-25 19:53:35 +00:00Commented Jan 25, 2010 at 19:53
-
@statichippo:I want to create TextBox control from scratch.Vijjendra– Vijjendra2010-01-25 20:04:47 +00:00Commented Jan 25, 2010 at 20:04
2 Answers
A control is simply a class. Create your own class deriving from the TextBox class. Override methods. Handle events. Add properties.
And then ask a specific question, and you'll get specific answers. Do a search on this site and you'll find recommendations for books on control development.
You'll also find http://asp.net to be of use.
Comments
If you want to create a TextBox control from scratch, you can just create a CustomControl (msdn: http://msdn.microsoft.com/en-us/library/zt27tfhy.aspx) that outputs a textbox:
<input type="text" />
Obviously you'll want to add properties like length and css styles. For an existing control like a TextBox I can't really imagine why you wouldn't just inherit from TextBox to add the extra functionality you want though -- why reinvent the wheel? But if that's what you want to do...