Reputation: 1007
I have an ASP.NET button which displays a report (a datatable and binded to my gridview) on my default.aspx
page.
However I want it to show it in a new page, and when button is clicked again, it should open a third page.
How to do that ?
Upvotes: 1
Views: 29766
Reputation: 135
write two pages from one page open another page in popup using the link below..
after you have passed the id to the popup get it like this
request.Querystring["Id"].tostring();
<a href="#" onclick="Popup=window.open('yourNewPag.aspx?id='+'<%id to be passed to the popup,e.g. #Eval<"Id"> %>','Popup','toolbar=no, location=yes,status=no,menubar=no,scrollbars=yes,resizable=no, width=700,height=350,left=430,top=23'); return false;">OpenPOPUP</a>
Upvotes: 1
Reputation: 8626
You can use javascript's window.open
property for this purpose.
You will have to use window.open on clientclick
of button so that it will open window as a pop up.
It will be as below:
window.open('default.aspx','name','width=200,height=200');
EDIT:
Can also try as follows:
protected void Button_Click(object sender, EventArgs e)
{
Response.Write("<script language=javascript>child=window.open('default.aspx');</script>");
Response.Write("<script language=javascript>child=window.open('default1.aspx');</script>");
}
Upvotes: 3
Reputation: 6103
You can use light-weight Fancy Box Jquery !
<a class="fancybox fancybox.iframe" href='popUp.aspx'>
ClickToOpen</a>
Upvotes: 0
Reputation: 11063
You can use javascript, (Window.Open
) to get it open in a new page. Check this example:
http://windowopen.codeplex.com/
Upvotes: 0