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

Reloading UpdatePanel

$
0
0

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:ListViewID="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


Viewing all articles
Browse latest Browse all 5678

Trending Articles



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