Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 31st, 2009, 11:23 AM
Authorized User
 
Join Date: Dec 2007
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default ModalpoupExtender unnecessary postback

hi,

my application requires to show a wait popup before postback and show the server side message after postback response in another popup.

for this i have taken two panels and two modal popupextrender controls one to show during the post back and another to show after the postback is complete.

in the server side i hide the first popupextender and show the second popup extender.

1st popup is triggered through the clientside and closed at the server side and the second popup is triggered through the server side code and ends in the client side without any scripting.

Although it works fine but after the response when i click on the ok button in the second popup it leads to a post back which is unnecessary. the button does not even has a serverside click event.

Any Ideas how to get around this ? Plz Help

Code:
 
        <asp:Button ID="waitbtn" runat="server"   Style="display: none"  />
        <ajx:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="waitbtn" 
        PopupControlID="wait"  BehaviorID="waitmodal" >
        </ajx:ModalPopupExtender>
        <asp:Panel ID="wait" runat="server" Height="100%" width="100%" Style="display: none"  HorizontalAlign="Center">
        
        <table style="background-color: #2f4f4f;" >
        <td width="10px" style="background-color:#2f4f4f;"></td>
        <td style="background-color:#2f4f4f;" Height="50px">
        <img alt =""  src="../../App_Images/loading.gif" style="vertical-align: middle; text-align: left;" />
        </td>
        <td width="10px" style="background-color:#2f4f4f;"></td>
        <td style="vertical-align: middle; text-align: center;background-color:#00C0C0; font-weight: normal; font-size: 14pt; color: yellow;">
        <asp:Label ID="Label2" runat="server" BackColor="#00C0C0"  Text="Processing Request.Please Wait !!" Width="320px"  ></asp:Label>
        </td>
        </table>
        </asp:Panel>
        
        
        
        <asp:Button ID="msgbtn" runat="server"   Style="display: none"  />
        <ajx:ModalPopupExtender ID="ModalPopupExtender2" runat="server" TargetControlID="msgbtn" 
        PopupControlID="smsg"  BehaviorID="smsgmodal" >
        </ajx:ModalPopupExtender>
        <asp:Panel ID="smsg" runat="server" Height="100%" width="100%" Style="display: none"  HorizontalAlign="Center">
        
        <table style="background-color: #8f8f8f;" >
        <td width="10px" style="background-color:#4f4f4f;"></td>
        <td style="background-color:#8f8f8f;" Height="50px">
        <img alt =""  src="../../App_Images/loading.gif" style="vertical-align: middle; text-align: left;" />
        </td>
        <td width="10px" style="background-color:#8f8f8f;"></td>
        <td style="vertical-align: middle; text-align: center;background-color:#00C0C0; font-weight: normal; font-size: 14pt; color: yellow;">
        <asp:Label ID="Label1" runat="server" BackColor="#00C0C0"  Text="Saved Successfully!!" Width="320px"  ></asp:Label>
        <asp:Button ID="btnok" runat="server"   text="ok"   />
        </td>
        </table>
        </asp:Panel>
__________________
dev(1);





Similar Threads
Thread Thread Starter Forum Replies Last Post
Postback grstad ASP.NET 2.0 Basics 3 June 13th, 2008 07:56 AM
postback events jgrant ASP.NET 2.0 Basics 1 September 5th, 2007 10:38 PM
postback sameer_1981 ASP.NET 1.0 and 1.1 Basics 1 February 23rd, 2007 09:36 AM
Unnecessary refresh of parent window swati_joshi ASP.NET 1.0 and 1.1 Professional 7 September 19th, 2006 08:13 AM
Postback raulsormus Classic ASP Basics 0 February 22nd, 2005 09:36 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.