I am new in Visual Studio and using visual Studio 2008.
In a project I want to make all text in uppercase while typed by the user without pressing shift key or caps lock on.
I have used this code
TextBox1.Text = TextBox1.Text.ToUpper();
but it capitalize characters after pressing Enter key.
I just want that characters appear in uppercase while typing by the user without pressing shift key or without caps lock on.
Total page code is as...
public partial class Test : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void TextBox1_TextChanged(object sender, EventArgs e)
{
TextBox1.Text = TextBox1.Text.ToUpper();
}
}
Have any one any solution, please guide me.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…