Sunday, November 29, 2009

Popup in asp.net 2.0

in default.aspx.cs page
protected void btnPopup_Click(object sender, EventArgs e)
{
string sFeature = "dialogWidth: 400px; dialogHeight: 250px;";
string sUrl = "Popup.aspx?Info=No Shipping Information";
Page.ClientScript.RegisterStartupScript(this.GetType(), "ShowPopup", "");
}


in popup.aspx.cs page

protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
lblPopInfo.Text = Request.QueryString["Info"].ToString();
}
}

No comments: