Public static void OpenPopup (System.Web.ui.WebControls.WebControl Opener, String PagePath, String Windowname, Int Top, Int Left, Int Width, Int Height)
{
String clientscript;
String windowattribs;
WindowAttribs = "left =" Left.toString () "PX,"
"TOP =" Top.Tostring () "PX,"
"width =" width.toString () "px,"
"height =" height.toString () "px,"
"Left = ' (Screen.Width -" Width.toString () ") / 2) ',"
Clientscript = "WINDOW.OPEN ('" PagePath "', '"
Windowname "','" windowattribs "; return false;";
Opener.attributes.add ("
Onclick ", Clientscript);
}
Private Void Page_Load (Object Sender, System.EventArgs E) {// Place the user code here to initialize the page if (! ispostback) {OpenPopup (Button1, "http:////www.google.com";); OpenPopup Button2, "http://www.google.com"; "", "", 0, 0, 300, 300);}}