Microsoft Dot Net Master

Microsoft Dot Net Master
Microsoft Dot Net Master

Monday, June 20, 2011

Open Popup from Codebehind

Two Type of Open Popup from Codebehind

1: 

string strScript = "<script> ";
strScript += "var newWindow = window.open('Rpt_CSViewReport.aspx?EmployeeID=" + e.CommandArgument + "&MNo=" + ddMonth.SelectedValue + "&MName=" + ddMonth.SelectedItem.Text + "&Year=" + ddYear.SelectedValue + "', '_blank','height=450, center:yes, width=600, status=no, resizable= yes, menubar=no, toolbar=no, location=yes, scrollbars=no, status=no');";
strScript += "</script>";
Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "strScript", strScript.ToString());


2:

Response.Write("<script language=javascript>window.open('Rpt_CSViewReport.aspx?EmployeeID=" + e.CommandArgument + "', '_blank','height=450, center:yes, width=600, status=no, resizable= yes, menubar=no, toolbar=no, location=yes, scrollbars=no, status=no');</script>");

No comments:

Post a Comment