<a href="../folder5/anotherpage.aspx" target=_blank>Another Page</a>
I've placed a button on the page that I would like to have do the same
thing:
<asp:button id="btnAnotherPageLink" runat="Server" text="Another Page" />
Protected Sub btnAnotherPageLink_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnActiveDialup.Click
Response.Redirect("../folder5/anotherpage.aspx")
End Sub
This will cause the current page to navigate to the destination page. How
can I have a new window open up and load the destination page instead?
TIA,
Jim
-- bruce (sqlwork.com)
After some searching, I found that adding this to the Page_Load sub did the
trick:
btnAnotherPageLink.Attributes.Add("onClick",
"window.open('../folder5/anotherpage.aspx')")
> After some searching, I found that adding this to the Page_Load sub did
> the trick:
>
> btnAnotherPageLink.Attributes.Add("onClick",
> "window.open('../folder5/anotherpage.aspx')")
Or alternatively:
<asp:Button ID="btnAnotherPageLink" runat="server" Text="Another Page"
OnClientClick="window.open('../folder5/anotherpage.aspx');return false;" />
Don't forget the semi-colons at the end of each JavaScript statement...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net
Oh! That's helpful! Thanks Mark!
> Oh! That's helpful! Thanks Mark!
Always a pleasure, never a chore... :-)