radio button list - click event

Discussion in 'ASP .Net' started by Mr. X., Jan 19, 2009.

  1. Mr. X.

    Mr. X. Guest

    How can I capture a radio button list click event (code behind) ?

    <asp:RadioButtonList ID="radList" runat="server"

    RepeatDirection="Horizontal">

    ....

    </asp:RadioButtonList>

    ************



    What I did is (on code behind) :

    radList_OnSelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
    Handles radList.SelectedIndexChanged

    .....

    , but it doesn't work.



    Thanks :)
     
    Mr. X., Jan 19, 2009
    #1
    1. Advertising

  2. Mr. X.

    miher Guest

    Hi,

    Events associated with controls not causing postback does not get fired,
    until something happens that cause a postback. By default the
    RadioButtonList does not cause postback so the selecteditemchanged event is
    only raised when the page is posted back for some reason (button click for
    example). If You would like to "see" the event immediately set the
    radiobuttonlists AutoPostBack property to true.

    Hope You find this useful.
    -Zsolt


    "Mr. X." <no_spam_please@nospam_please.com> az alábbiakat írta a következõ
    üzenetben news:OW7Ox$...
    > How can I capture a radio button list click event (code behind) ?
    >
    > <asp:RadioButtonList ID="radList" runat="server"
    >
    > RepeatDirection="Horizontal">
    >
    > ...
    >
    > </asp:RadioButtonList>
    >
    > ************
    >
    >
    >
    > What I did is (on code behind) :
    >
    > radList_OnSelectedIndexChanged(ByVal sender As Object, ByVal e As
    > EventArgs) Handles radList.SelectedIndexChanged
    >
    > ....
    >
    > , but it doesn't work.
    >
    >
    >
    > Thanks :)
    >
    >
     
    miher, Jan 19, 2009
    #2
    1. Advertising

  3. Mr. X.

    Mr. X. Guest

    Thanks.

    I would like to learn more about postback issue,
    and how asp.net is related to that ?

    Thanks :)
     
    Mr. X., Jan 20, 2009
    #3
  4. Mr. X.

    miher Guest

    Hi,

    If You would like to learn more about asp.net http://www.asp.net would be a
    good place to start.
    Theres lots of video tutorials there, just an example :
    http://www.asp.net/LEARN/videos/video-12.aspx
    Also check out these videos, about basic concepts.
    http://weblogs.asp.net/scottgu/archive/2006/02/26/439088.aspx

    Have fun.
    -Zsolt


    "Mr. X." <no_spam_please@nospam_please.com> az alábbiakat írta a következõ
    üzenetben news:...
    > Thanks.
    >
    > I would like to learn more about postback issue,
    > and how asp.net is related to that ?
    >
    > Thanks :)
    >
     
    miher, Jan 20, 2009
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page