Click here to Skip to main content
15,878,602 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi i want to create Custom Server Controls for TextBox
in that i want to set textBox length as 5 or 10 when
user Type MaxLength attribute then value should be only 5 or 10 to set
for ex
<cc1:TextBox runat="server" MaxLength="5">
5 or 10 should be visible in option

plz help
Sergey Alexandrovich Kryukov 3-Feb-14 16:47pm    
Did you try to add any? What happened?

Control's properties in ASP.NET are no different from any other properties:[^].

Share this answer

Create Custom Control and Properties[^]

Custom Control with Custom Properties[^]

And for the last qusetion ,
5 or 10 should be visible in option

You can use enum for using predefined values which will appear on the Markup to select.

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900