locked
Reloading UpdatePanel RRS feed

  • Question

  • User1213828331 posted

    I have Link Buttons(say 1 and 2) in List View. There exists a Parent Update Panel.

    Also in .aspx I have EnableEventValidation as false.

    Then we have a Child Update Panel.

    <asp:UpdatePanel ID="updActivePol"runat="server"UpdateMode="Conditional"ChildrenAsTriggers="true">

    In that we have a listView.

    <asp:ListView ID="lvPolicy" runat="Server">
    //Then we have a Button.
        <ItemTemplate>
    <asp:ImageButton ID = "imgClaims"  title="Check Claim Status"  height="17" width="16" runat = "server" CausesValidation = "false" OnClientClick="javascript:EnableClaims();"
                                            ImageUrl = "~/images/searchHoverButton-sel.png" OnClick="imgClaims_Click" CommandName = "Claims" CommandArgument = '<%# Eval("PolicyNumber") %>' /> &nbsp;&nbsp;    
    
                                       <asp:ImageButton Height="17" runat = "server"  Width="15" ID = "imgLinked" title="Linked Policy"
                                        OnClick = "imgLinked_OnClick" CommandName = "LinkedPolicy" CausesValidation = "false"
                                        ImageUrl = "~/images/go.gif" CommandArgument = '<%# Eval("PolicyNumber") %>' />
    </ItemTemplate>
    </ListView>
    
    //Also on itemCommand I have written below line of code.
    
                    if (e.CommandName == "LinkedPolicy")
                    {
           PostBackTrigger trigger = new PostBackTrigger();
                        Button firstButton = (Button)lvActivePolicy.FindControl("imgLinked");
                        trigger.ControlID = firstButton.UniqueID;
                        updActivePolicies.Triggers.Add(trigger);
                        updActivePolicies.Update();
        }   else if (e.CommandName == "Claims")
                    {
          PostBackTrigger trigger1 = new PostBackTrigger();
                        Button secondButton = (Button)lvActivePolicy.FindControl("imgClaims");
                        trigger1.ControlID = secondButton.UniqueID;
    
                        updActivePolicies.Triggers.Add(trigger1);
                        updActivePolicies.Update();
        }

    COncern Areas: Once I click on LinkedPolicy Button(imgLinked_OnClick) I get a Popup of Div.

     AjaxControlToolkit.ToolkitScriptManager.RegisterStartupScript(updActivePolicies, this.GetType(),
                      "Failure", "$('#divLinkPolicies').showModal();", true);

    I close the Div(PostBack Occurs.After again the div opens!That is the first concern.).

    Then again I click Claims button I get a popup of both Divs i.e div LinkPolicy and pnlClaims whereas in server code for imgClaims_Click I have written below code.

    AjaxControlToolkit.ToolkitScriptManager.RegisterStartupScript(updActivePolicies, this.GetType(), "Failure", "$('#pnlClaims').showModal();", true);

    Urgently reply please.

    Regards,

    Sachin Kulkarni

    Monday, July 7, 2014 8:42 AM

All replies

  • User1918509225 posted

    Hi Sachin_a_k,

    If you don't mind ,please post your project  which can recreate to me,so that I test it in my local  computer.

    Best Regards,

    Kevin Shen. 

    Monday, July 7, 2014 11:00 PM
  • User1213828331 posted

    HI Kevin,

    How can I upload the entire solution?Can u guide me for this?The size is 5 MB.

    Tuesday, July 8, 2014 2:49 AM
  • User1918509225 posted

    Hi Sachin_a_k,

    You can upload your project to me in onedrive ,and share a link to me ,so that i can download (please remove your personal information)

    https://onedrive.live.com/

    Best Regards,

    Kevin Shen.

    Tuesday, July 8, 2014 2:56 AM