简体   繁体   中英

facebook iframe application ,with master page, doesn't firing OnSelectedIndexChanged event

this is my radio button list:

   <asp:RadioButtonList runat="server" ID="rdlTest" OnSelectedIndexChanged="rdlTst_selectedChange">
            <asp:ListItem>1</asp:ListItem>
            <asp:ListItem>2</asp:ListItem>
        </asp:RadioButtonList

this is the code behind:

protected void rdlTst_selectedChange(object sender, EventArgs e)
    {
        Response.Write("hello");
    }

it's not firing the event for some reason

You need to add AutoPostBack = "true" onto the definition of the RadioButtonList.

  <asp:RadioButtonList runat="server" ID="rdlTest" AutoPostBack="true" OnSelectedIndexChanged="rdlTst_selectedChange">
            <asp:ListItem>1</asp:ListItem>
            <asp:ListItem>2</asp:ListItem>
   </asp:RadioButtonList>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM