i have a radio button list out of update panle and i have a button in update panle and i want to change selected value my radio when i click on button
post back control outside update panel
Collapse
X
-
Code:protected void MyLinkButton_Click(object sender, EventArgs e) { rdo.SelectedValue = "2"; } /////////// <div> <asp:RadioButtonList ID="rdo" runat="server" AutoPostBack="True" RepeatDirection="Horizontal"> <asp:ListItem Value="1" Selected="True">1</asp:ListItem> <asp:ListItem Value="2"></asp:ListItem> </asp:RadioButtonList> <asp:ScriptManager ID="sm1" runat="server"> </asp:ScriptManager> <asp:UpdatePanel ID="up1" runat="server"> <ContentTemplate> <%= DateTime.Now %> <asp:LinkButton ID="MyLinkButton" runat="server" Text="Click me" OnClick="MyLinkButton_Click" /> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="MyLinkButton" EventName="Click" /> </Triggers> </asp:UpdatePanel> <asp:PlaceHolder ID="plc" runat="server"></asp:PlaceHolder> <br /> This will refresh only first page load time: <%= DateTime.Now %> </div>Comment
Comment