views:

504

answers:

2

I want to implement the own custom TextBox control in Asp.Net(C#). Please give me some idea and links.

+3  A: 

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.

John Saunders
A: 

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...

statichippo