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>");


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.

This code is giving error "The resource object with key 'multipages_okbutton_accesskey' was not found."

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.