How to close the window by clicking close button in .net???
What is the code for clicking close button in asp.net developing in c#????
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Satyapriya NayakPosted Mar 22, 2013, 2:25 AM
or
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
namespace WebApplication17
{
public partial class WebForm8 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
this.Button1.Attributes.Add("OnClick", "self.close()");
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write("");
}
}
}