Start New Discussion Reply to this Discussion How to close asp.net window?
I want to write code behind by close button so when user click rhat button whole application is close... is it possible?
//this code is not giving right result...
protected void ImageButton3_Click(object sender, ImageClickEventArgs e)
{
Response.Write("<script language='javascript'>window.open('','_self',''); window.close();</script>");
// Response.Write("<script language='javascript'>self.close();</script>");
//Response.Write("<script language='javascript'> { self.close() }</script>");
//Me.ClientScript.RegisterClientScriptBlock(Me.GetType(), "closemyself", "<script>self.close();</script>");
}
10 Months Ago
Last Updated
Related Article: Having touble with ASP.Net Login page
is a solved ASP.NET discussion thread by albright_family that has 2 replies, was last updated 1 year ago and has been tagged with the keywords: asp.net, vb.net.
sania khan
Light Poster
34 posts since Dec 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0
I never work in asp.net but i have some knowldge of asp.net so you have to try this code <asp:Button Id="btnOK" runat="server" AccessKey="<%$Resources:
wss,multipages_okbutton_accesskey%>" Width="70px" Text="<%$Resources:wss,
multipages_okbutton_text%>" OnClick="btnOK_Click" /> I think this code solve your problem.
touchweb
Newbie Poster
2 posts since Jul 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0
This code is giving error "The resource object with key 'multipages_okbutton_accesskey' was not found."
sania khan
Light Poster
34 posts since Dec 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0
© 2013 DaniWeb® LLC
Page rendered in 0.1533 seconds
using 2.7MB