This is a migrated thread and some comments may be shown as answers.

Radio button list not firing post back

1 Answer 217 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Pratik
Top achievements
Rank 1
Pratik asked on 01 Mar 2011, 02:58 PM

Hi

we have page on which i have radio button list with Autopost = true when page load for the first time it works fine
but when i move from Page 1 to Page 2 And come back to page 1 with some query string when click on radio button list it does not post back

Plz See Code below

 <div id="divshippmethod" class="PageSection full ShippingInformation" runat="server">
        <h1>
            Shipping Method</h1>
        <div class="content">
            <asp:RadioButtonList CellSpacing="0" CellPadding="0" ID="rbtnShippingMethod" RepeatDirection="Horizontal"
                AutoPostBack="true" runat="server">
                <asp:ListItem Text="&nbsp;&nbsp;Shipping Information" Value="0" Selected="True"></asp:ListItem>
                <asp:ListItem Text="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mail List Upload"
                    Value="1"></asp:ListItem>
            </asp:RadioButtonList>
        </div>

Rajax setting are below
 <telerik:AjaxSetting AjaxControlID="rbtnShippingMethod">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="rbtnShippingMethod" LoadingPanelID="RadAjaxLoadingPanel" />
                        <telerik:AjaxUpdatedControl ControlID="pnlShipping" />
                        <telerik:AjaxUpdatedControl ControlID="pnlMailListUpload" />
                    </UpdatedControls>
                </telerik:AjaxSetting>

Protected Sub rbtnShippingMethod_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles rbtnShippingMethod.SelectedIndexChanged
        If rbtnShippingMethod.SelectedValue = 1 Then
            pnlShipping.Visible = False
            pnlMailListUpload.Visible = True
        Else
            pnlShipping.Visible = True
            pnlMailListUpload.Visible = False
        End If
    End Sub
first time when pnlMailListUpload. is true, it has a button which Response.Redirects to another page on which i do some activity and come back to this page again.

now if i select any item from the radiobuttonlist then rbtnShippingMethod_SelectedIndexChanged is not firing , on doing inspectElement from FF we found that the required postback JS (__dopostbakc) is not attached with the onclick event of the radio button.

plz help.

1 Answer, 1 is accepted

Sort by
0
Kiara
Top achievements
Rank 1
answered on 04 Mar 2011, 02:47 PM
The configurator on this telerik demo has radiobutton list and works without issues. Can it be that the panels (pnlShipping, pnlMailListUpload) wrap the radiobutton list and changing their visibility causes the abnormality? Have in mind what you should know when show/hide controls on ajax requests from this sample: http://demos.telerik.com/aspnet-ajax/ajax/examples/common/showingwebcontrols/defaultcs.aspx

Kiara 
Tags
Ajax
Asked by
Pratik
Top achievements
Rank 1
Answers by
Kiara
Top achievements
Rank 1
Share this question
or