Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

postback is occuring when I click on radio button

$
0
0

Hi All,

 I have the following code on my web page. Whenever I am clicking the radio button, postback is occuring. I am using Ajax. When I tried using triggers, it works, but when the deployed the code on server, the radio button stopped responding, if I remove the trigger then the radio button responds, but postback occurs. below is my code:

<asp:updatePanel>   <ContentTemplate><tr><td align="left">
                    Test1 Type:<asp:RadioButtonList ID="rblTest1TypeId" RepeatDirection="horizontal" runat="server"
                                AutoPostBack="true" ></asp:RadioButtonList></td><td style="width: 191px"><asp:Button ID="btnClearTest1" runat="server" Text="Clear" CssClass="tab-button"
                        OnClick="btnClearTest1_Click" CausesValidation="false" /></td></tr><asp:UpdatePanel ID="updDisp" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true" ><ContentTemplate><div runat="server" visible="false" id="divDisp" >--%><tr><td align="left" colspan="6" style="padding: 0px 0 0px 0;"><asp:Panel ID="PanelTest1To" runat="server" Width="625px"><table border="0"><tr><td class="tab-panel-label" align="right" style="width: 150px;">
                                                    *Test1 To:</td><td><asp:DropDownList ID="ddlTest1ToId" runat="server" AutoPostBack="True"></asp:DropDownList><%-- <span style="font-size: 0.8em; color: #ff0000">Search above</span>--%></td></tr><tr><td class="tab-panel-label" align="right" style="width: 150px;">
                                                    *Test5 Date:</td><td class="tab-panel-field"><asp:TextBox ID="txtTest5BeginDate" runat="server" Width="90px"></asp:TextBox><asp:ImageButton ID="ImgTest5BeginDate" runat="server" ImageUrl="~/images/calendar.gif" /><span style="font-size: 0.8em; color: #ff0000">Format: mm/dd/yyyy</span><cc1:CalendarExtender ID="CldTest5BeginDate" runat="server" PopupButtonID="ImgTest5BeginDate"
                                                        TargetControlID="txtTest5BeginDate"></cc1:CalendarExtender></td></tr></table></asp:Panel></td></tr><tr><td align="left" colspan="6" style="padding: 0px 0 0px 0;"><asp:Panel ID="PanelTest6" runat="server" Width="625px"><table border="0"><tr><td class="tab-panel-label" align="right" style="width: 100px;"><asp:Label ID="lblTest6edDate" runat="server" Text="*Test6 Date:"></asp:Label></td><td class="tab-panel-field"><asp:TextBox ID="txtTest6edDate" runat="server" Width="90px"></asp:TextBox><asp:ImageButton ID="ImgTest6edDate" runat="server" ImageUrl="~/images/calendar.gif" /><span style="font-size: 0.8em; color: #ff0000">Format: mm/dd/yyyy</span><cc1:CalendarExtender ID="cldTest6edDate" runat="server" PopupButtonID="ImgTest6edDate"
                                                        TargetControlID="txtTest6edDate"></cc1:CalendarExtender></td></tr></table></asp:Panel></td></tr><tr><td align="left" colspan="6" style="padding: 0px 0 0px 0;"><asp:Panel ID="PanelTest100" runat="server" Width="625px"><table border="0"><tr><td class="tab-panel-label" align="right" style="width: 200px;">
                                                    *Test100tal Num:</td><td class="tab-panel-field"><asp:TextBox ID="txtTest100No" runat="server" Width="156px"></asp:TextBox></td></tr><tr><td class="tab-panel-label" align="right" style="width: 200px;"><asp:Label ID="lblTest100BeginDate" runat="server" Text="*Test100tal Date:"></asp:Label></td><td class="tab-panel-field"><asp:TextBox ID="txtTest100BeginDate" runat="server" Width="90px"></asp:TextBox><asp:ImageButton ID="imgTest100BeginDate" runat="server" ImageUrl="~/images/calendar.gif" /><span style="font-size: 0.8em; color: #ff0000">Format: mm/dd/yyyy</span><cc1:CalendarExtender ID="CalendarExtender1" PopupButtonID="imgTest100BeginDate"
                                                        runat="server" TargetControlID="txtTest100BeginDate"></cc1:CalendarExtender></td></tr><tr><td class="tab-panel-label" align="right" style="width: 200px;"><asp:Label ID="lblTest100Infor" runat="server" Text="Test100tal Information:"></asp:Label></td><td class="tab-panel-field"><asp:TextBox ID="txtTest100Information" runat="server" Height="61px" TextMode="MultiLine"
                                                        Width="430px"></asp:TextBox></td></tr></table></asp:Panel></td></tr></ContentTemplate></asp:UpdatePanel>

I have some code in the code behind that makes some panel visible and some panel visible=false

Protected Sub rblTest1TypeId_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles rblTest1TypeId.SelectedIndexChanged
        If rblTest1TypeId.SelectedValue = 3 Then
              do soemthing        
        ElseIf (rblTest1TypeId.SelectedValue = 2 Or rblTest1Id.SelectedValue = 4 Or rblTest1TypeId.SelectedValue = 5) Then
 do soemthing
                   Else
do soemthing
                    End If
    End Sub

any help will be greatly appreciated.

 


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>