Anda di halaman 1dari 1

//to open the popup window

using system.text;

{
stringbuilder sb = new stringbuilder();
sb.append("<script>");

sb.append("window.open('adminlpdetails.aspx', 'custompopup',
'width=620, height=410, location=center, toolbar=yes,addressbar=yes,scrollbar=yes,
resizable=yes');");

sb.append("</script>");
page.registerstartupscript("test", sb.tostring());
}

//for closing the popup window


{
stringbuilder sb = new stringbuilder ();
sb.append("<script>");
sb.append("window.close()");
sb.append("</script>");
page.registerstartupscript("test", sb.tostring());
}

//single line popup


clientscript.registerstartupscript(this.gettype(), "popup", "<script
language='javascript'>window.open('video.aspx','popup','width=370, height=370,
menubar=no, resizable=no')</script>");