Click here to Skip to main content
15,908,264 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have use updated pannel and with in this i have use gridview it contains checkbox if it checked i am doing some modification in database

but actually what happens if user check checkbox fast rapidly only first request get executed or might be 1 then 3rd then 5th get execute

can any one help me

ASP.NET
<asp:ScriptManager ID="ScriptManager1" runat="server" AsyncPostBackTimeout="360000" EnablePageMethods="true" ScriptMode="Release">
  </asp:ScriptManager>




 <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                                              <ContentTemplate>
                                                  <asp:GridView ID="grdMember" runat="server" CssClass="Grid" AutoGenerateColumns="False"
                                                      OnRowDeleting="grdMember_RowDeleting">
                                                      <Columns>
                                                          <asp:TemplateField HeaderText="Serial No">
                                                              <ItemTemplate>
                                                                  <asp:HiddenField ID="hdfAttendace_ID" Value='<%#Eval("Attendace_ID") %>' runat="server" />
                                                                  <%# ((GridViewRow)Container).RowIndex + 1%>
                                                              </ItemTemplate>
                                                          </asp:TemplateField>

                                                          <asp:TemplateField HeaderText="Attended" ItemStyle-Wrap="false">
                                                              <HeaderTemplate>
                                                                  <asp:CheckBox runat="server" ID="chkAll" AutoPostBack="true" OnCheckedChanged="onAllCheck"
                                                                      Text="Attended" />
                                                              </HeaderTemplate>
                                                              <ItemTemplate>
                                                                  <asp:CheckBox runat="server" ID="chkIsAttend" AutoPostBack="true" OnCheckedChanged="onChange"
                                                                      Checked='<%# Convert.ToBoolean(Eval("ISAttend")) %>' />
                                                              </ItemTemplate>
                                                              <ItemStyle Wrap="False" />
                                                          </asp:TemplateField>

                                                      </Columns>
                                                      <EmptyDataTemplate>
                                                          No Other Details found</EmptyDataTemplate>
                                                  </asp:GridView>
                                              </ContentTemplate>
                                          </asp:UpdatePanel>
Posted

SQL
on rowdatabound event register your control to scriptmanager

LinkButton lb1 = e.Row.FindControl("lnkbtnPhotoaddupload") as LinkButton;
                ScriptManager.GetCurrent(this).RegisterPostBackControl(lb1);

as like this and keep simple scriptmanager and put all the code in the updatepanel
 
Share this answer
 
Insted of
simple scriptmanager use

XML
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
                </asp:ToolkitScriptManager>


it will work now
 
Share this answer
 
Comments
Member-515487 5-Feb-14 4:26am    
no other option without dll
[no name] 5-Feb-14 4:34am    
on rowdatabound event register your control to scriptmanager

LinkButton lb1 = e.Row.FindControl("lnkbtnPhotoaddupload") as LinkButton;
ScriptManager.GetCurrent(this).RegisterPostBackControl(lb1);

as like this and keep simple scriptmanager and put all the code in the updatepanel

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900