Hello!
Simply, I have an UpdatePanel with a ListView inside of it, and a LinkButton inside each ListItem. Upon clicking this LinkButton, a ModalPopupExtender is supposed to be launched (it has its own associated Panel with another UpdatePanel inside of it, but that shouldn't be relevant, I think). This works, but the problem is that the before the ModalPopupExtender is displayed, and PostBack is triggered, and the transition looks sloppy due to the rendering that takes place before the ModalPopupExtender's Panel is displayed. For the life of me, I cannot figure out how to make the LinkButtons within each ListItem cause only an AsyncPostBack (i.e., the scroll position should not change on the page, and the page should be rendered all over again before displaying the ModalPopupExtender's Panel). Below is my aspx page, with unnecessary content removed:
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server"><asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager><asp:UpdatePanel ID="UpdatePanel3" runat="server" UpdateMode="Conditional"><Triggers><asp:AsyncPostBackTrigger ControlID="ListView1" EventName="ItemCommand" /><asp:AsyncPostBackTrigger ControlID="ListViewActivities" EventName="ItemCommand" /><asp:PostBackTrigger ControlID="TripDayDDL" /></Triggers><ContentTemplate><asp:ListView ID="ListView1" runat="server" GroupItemCount="1" OnItemCommand="ListView1_OnItemCommand" DataKeyNames="ID"><LayoutTemplate><table border="0" cellpadding="0px" width="100%"><asp:PlaceHolder ID="itemPlaceHolder" runat="server"></asp:PlaceHolder></table></LayoutTemplate><ItemTemplate><tr><td width="162px"><asp:LinkButton ID="TaskTitle" class="hover" runat="server" CommandName="View" Text=<%# Eval("taskname") %>></asp:LinkButton><asp:HiddenField ID="HiddenTaskID" runat="server" Value=<%# Eval("ID") %> /></td><td width="38px"><asp:Image ID="checkMark" runat="server" Visible=<%# Eval("status") %> ImageUrl="~/Auth/images/check.png" ToolTip="Completed" /></td></tr></ItemTemplate><ItemSeparatorTemplate><td id="Td2" colspan="2" runat="server"><hr style="border:1px solid #999999;" /></td></ItemSeparatorTemplate></asp:ListView><asp:Button ID="modal_button" runat="server" Text="Button" style="display:none;" /><asp:Button ID="Add_button" runat="server" CssClass="pointer" Text="Add A Task" /><ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender" BehaviorID="ModalPopupExtenderb" runat="server" DropShadow="true" TargetControlID="modal_button" BackgroundCssClass="modalBackground" PopupControlID="popUpPanel" OkControlID="Cancel"></ajaxToolkit:ModalPopupExtender><asp:Panel ID="popUpPanel" CssClass="panel" runat="server"><asp:UpdatePanel ID="UpdatePanel1" runat="server"><ContentTemplate><asp:Button ID="Cancel" runat="server" UseSubmitBehavior="False" /></ContentTemplate></asp:UpdatePanel></asp:Panel>Consequently, the codebehind for the LinkButton being clicked does some work, and then executes the modal_button, which triggers the ModalPopupExtender. Also, if you notice the Add_button button under the ListView, this button actually opens another Panel using another ModalPopupExtender, and it is asynchronous. Just trying to accomplish the same with the LinkButtons. Any help or insight into how I can make this work within my code would be most helpful!
Respectully,
Josh