to open a window:
1) In page_load:
Button1.Attributes.Add("OnClick","javascript:window.open('popupnew.aspx','','width=300,height=200')");
Or
2)In btn_click
string popupScript = "<script language='javascript'>" +
"window.open('PopUp.aspx', 'CustomPopUp', " +
"'width=200, height=200, menubar=yes, resizable=no')" +
"</script>";
Page.RegisterStartupScript("PopupScript", popupScript);
Can't we open a new window with out using Java script.
The simple answer is NO
The reason is clear, however. Just because you view the page you created with ASP.Net in a browser doesn't mean it's a client scripting language
ASP.Net is a SERVER-side platform- Javascript is a client-side scripting language
0 comments:
Post a Comment