Control about text in a textBox

Last post 07-13-2009 2:20 AM by Vince Xu - MSFT. 2 replies.

Sort Posts:

  • Control about text in a textBox

    07-09-2009, 6:53 PM
    • Member
      point Member
    • taztura
    • Member since 07-09-2009, 10:44 PM
    • Posts 1

    Hello

    I have a question. I want that when an user write in a textBox the text must be transformed with uppercase letter. Somebody can tell me how I can make this?

    I started not from a long time to use asp net and so I have needed some help....I'm sorry  Laughing

    thanks you

    taztura
  • Re: Control about text in a textBox

    07-09-2009, 10:31 PM
    Answer
    • Contributor
      5,624 point Contributor
    • RatheeshC
    • Member since 04-25-2008, 6:05 PM
    • Posts 1,198

    Hi,

    Add this style in your text box

    eg:

     <asp:TextBox ID="TextBox1" runat="server" style="text-transform:uppercase"></asp:TextBox>

     

    Thanks

    asp:TextBox ID="TextBox1" runat="server" style="text-transform:uppercase"></asp:TextBox>

     

    Thanks
    Ratheesh

    Please mark it as answer if it resolves your issue.
  • Re: Control about text in a textBox

    07-13-2009, 2:20 AM
    Answer

     Hi,

    You can define client onkeypress event for TextBox. In this event, you can transform the content in textbox. You can also define onblur client event. It will be execute after textbox losts focus.

     


    Vince Xu
    Microsoft Online Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Page 1 of 1 (3 items)