Professional Web Applications Themes

radio button event in web form - ASP.NET General

I created a ASP.NET Web Form using VB.NET with a text box, 2 radio buttons. When the user click the first radio button, the text will change to uppercase. If the user clicks the other radio button, the text will change to lowercase. I added the following event, but still won't able to change the text to uppercase. Private Sub RadioButton1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged TextBox1.Text = UCase(TextBox1.Text) End Sub any ideas?...

  1. #1

    Default radio button event in web form

    I created a ASP.NET Web Form using VB.NET with a text box, 2 radio buttons.
    When the user click the first radio button, the text will change to
    uppercase. If the user clicks the other radio button, the text will change
    to lowercase.

    I added the following event, but still won't able to change the text to
    uppercase.
    Private Sub RadioButton1_CheckedChanged(ByVal sender As Object, ByVal e As
    System.EventArgs) Handles RadioButton1.CheckedChanged
    TextBox1.Text = UCase(TextBox1.Text)
    End Sub


    any ideas?



    John Guest

  2. #2

    Default Re: radio button event in web form

    You may want to check out the ASP.NET newsgroups, they could probably help
    you, but FYI, the RadioButton needs to be set to AutoPostback.

    --
    HTH,
    -- Tom Spink, Über Geek

    Please respond to the newsgroup,
    so all can benefit


    "John Davis" <com> wrote in message
    news:#HRM#phx.gbl... 
    buttons. 


    Tom Guest

  3. #3

    Default Re: radio button event in web form

    ???

    He said ASP.NET in his original post... And he also X-Posted to the ASP.NET
    newsgroup

    --
    HTH,
    -- Tom Spink, Über Geek

    Please respond to the newsgroup,
    so all can benefit


    "Cor" <com> wrote in message
    news:3f4cc951$0$29307$wxs.nl... 


    Tom Guest

  4. #4

    Default Re: radio button event in web form

    Yes, once I set the property of radio button to AutoPostBack=True, the text
    in the text box will change automatically when i click the radio button.

    However, since I have 2 radio buttons, when I click one of the radio button,
    the text will change. When I click the other radio button, the check mark
    still there in the previous radio button. OK, then I do the following to
    clean up the old choice. But it is tedious if there are 10 radio buttons,
    since radio button only allows users to choose ONE CHOICE at a time. I just
    think to clear the old check mark should be done automatically as ASP.NET
    feature, not programmatically. Maybe I just don't know. Please
    advice.Thanks.

    Private Sub RadioButton1_CheckedChanged(ByVal sender As Object, ByVal e As
    System.EventArgs) Handles RadioButton1.CheckedChanged
    RadioButton2.Checked = False
    TextBox1.Text = UCase(TextBox1.Text)
    End Sub

    Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal
    e As System.EventArgs) Handles RadioButton2.CheckedChanged
    RadioButton1.Checked = False
    TextBox1.Text = LCase(TextBox1.Text)
    End Sub


    John



    "Chris Wilmot" <co.uk> wrote in message
    news:#g$phx.gbl... 
    > buttons. [/ref]
    change [/ref]
    As 
    >
    >[/ref]


    John Guest

Similar Threads

  1. Sending radio button form data to PHP email generator
    By shambo in forum Adobe Flash, Flex & Director
    Replies: 0
    Last Post: March 29th, 09:16 PM
  2. Radio Button to change Form Fields
    By Ozbroomy in forum Coldfusion - Advanced Techniques
    Replies: 2
    Last Post: March 31st, 08:39 PM
  3. Replies: 2
    Last Post: May 28th, 06:23 AM
  4. Radio Button Help me please!
    By Marc de Kruijf in forum Macromedia Flash Actionscript
    Replies: 0
    Last Post: February 22nd, 10:31 PM
  5. radio button (Thanks for your help Rob)
    By pandey in forum Macromedia Director Lingo
    Replies: 2
    Last Post: January 20th, 01:20 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139