I want to create a user control [textbox] which convert all the text in the Upper case.
In normal web page, I can do it via
<asp:TextBox ID="TextBox1" runat="server">
</asp:TextBox>
<style type="text/css">
#TextBox1
{
text-transform: uppercase;
}
</style>
I am not aware how to convert them in user control and how can I create my own textbox control which has this feature in build. So that I can drag-drop them from my toolbox and can use it.
Any help?
Edit
It would be just like, I want to give one more property to the textbox [Let say: Uppercase=”True” or Uppercase=”False”] which will decide whether the textbox character will be uppercase or not.
Edit 1

Edit 2
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
namespace UppercaseBox
{
public class UppercaseTextBox : System.Web.UI.WebControls.TextBox
{
public extern Boolean Uppercase
{ get;
set;
}
public override string Text
{
get
{
return Uppercase && !string.IsNullOrEmpty(base.Text) ? base.Text.ToUpper() : base.Text;
}
set
{
base.Text = Uppercase && !string.IsNullOrEmpty(value) ? value.ToUpper() : value; ;
}
}
}
}

The simpler way i see is that you could create a custom control that inherits from TextBox and override the Text property so that it changes the text to uppercase.
The uppercasing could depend on a property of your control, to allow you to customize the textbox in the page using it.
Your inherited control could also set its style to uppercase but i’d recommend alternatively using themes if you don’t want to bother setting the style at each use
EDIT
C# Version would look like