Use java script open method for the above effect.
Syntax : oNewWindow = object.open( [sURL] [, sName] [, sFeatures] [, bReplace])
sURL (Optional): String that specifies the URL of the document to display. If no URL is specified, a new window with about:blank is displayed.
sName (Optional): String that specifies the name of the window. This name is used as the value for the TARGET attribute on a form or an anchor element.
bReplace (Optional) : Boolean that specifies whether the sURL creates a new entry or replaces the current entry in the window's history list. This parameter only takes effect if the sURL is loaded into the same window.
true- sURL replaces the current document in the history list
false- sURL creates a new entry in the history list.
ex:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Page1</title>
<script type ="text/javascript" >
function OpenPopupWindow()
{
window.open("Page2.aspx","","toolbar=no,location=no, status = yes, menubar=no,scrollbars=no, width =500, height = 300");
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:LinkButton ID="lnkPage2" runat="server" OnClientClick = "OpenPopupWindow();" >Page2</asp:LinkButton>
</div>
</form>
</body>
No comments:
Post a Comment