.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

PopUp Closing

Posted By: Aamrapali Tamgadge     Posted Date: March 04, 2011    Points:2   Category :ASP.Net
Hi Can anyone suggest me how to close the current popup window and go to the next aspx page..m to much tired of this my popup is not getting closed

Responses
Author: Karthikeyan Anbarasan       [Moderator]      
Posted Date: March 04, 2011     Points: 20   

Call this js fn and try to close the window and then do a redirect

<a href="javascript:CloseWindow()">
<asp:button id="CancelButton" runat="server" Width="60px" CssClass="btn" Text="Cancel"></asp:button>

Write Script in Header Section

<script language="javascript" type="text/javascript">
function CloseWindow()
{
self.close();
}
</script>

Thanks
Karthik
http://www.f5debug.net
Mark as Answer if the answer solves your issue!!!
Author: Nagaraju             
Posted Date: March 10, 2011     Points: 20   

in .vb page -Button event write the below code
ClientScript.RegisterStartupScript(Me.GetType(), "", "javascript:window.close();", True)

.aspx Html page
<script language="javascript" type="text/javascript">
function PassValues()

{
window.opener.document.forms(0).submit();
self.close();
}
</script>

Author: Dhivya             
Posted Date: March 10, 2011     Points: 20   

i'm using Ajax Modal popup...
so i create one cancel button,Label,panel
Label using for "TargetControlId"..
Panel using for "PopupControlId"..
button1_click
{
Modalpopup.hide();
}
<cc1:ModalpopupExtender id="Modalpopup" runat="server" popupcontrolid="panel1" targetcontrolid="label1"
backgroundcssclass="modalbackground"/>
<asp:panel="panel1">
<asp:Label="label1"/>
<asp:Button="button1"/>
</asp:Panel>



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend