I am using vb.net 2.0. I am having issue in my application that if click on a link from the links page inside the application, it should open new browser (for IE 6 should be a new browser, for IE 7 should be a new tab) and not open that web page
inside the application.
Can anyone please give me reply. Its urgent in my application
Thanks In Advance
it should open new browser and not open that web page inside the applicationclick on link
Joseph has given you the correct answer. However, it will always open in a new window, not a new tab. Tabs weren't invented when they decided in the html anchor specification.
I tried to implement this as a hyperlink within the gridview and it opened up my details.aspx page within the same tab as my original page, so it did not exactly work?
how do i get it to open in a new tab rather than the Tab i am in...if you get my meaning so that i can have the original grid in one tab and the details page in another tab?
nareshchowda...
Member
8 Points
80 Posts
click on link, it should open new browser and not open that web page inside the application
Oct 30, 2007 02:25 PM|LINK
Hi,
I am using vb.net 2.0. I am having issue in my application that if click on a link from the links page inside the application, it should open new browser (for IE 6 should be a new browser, for IE 7 should be a new tab) and not open that web page inside the application.
Can anyone please give me reply. Its urgent in my application
Thanks In Advance
it should open new browser and not open that web page inside the application click on link
jguadagno
Contributor
3823 Points
587 Posts
Re: click on link, it should open new browser and not open that web page inside the application
Oct 30, 2007 02:41 PM|LINK
Set the target attribute of the <a> (anchors) to '_blank'
My Website: http://www.josephguadagno.net
Mikesdotnett...
All-Star
154818 Points
19853 Posts
Moderator
MVP
Re: click on link, it should open new browser and not open that web page inside the application
Oct 30, 2007 02:43 PM|LINK
Joseph has given you the correct answer. However, it will always open in a new window, not a new tab. Tabs weren't invented when they decided in the html anchor specification.
Beginning ASP.NET Web Pages with WebMatrix | My Site | Twitter
nareshchowda...
Member
8 Points
80 Posts
Re: click on link, it should open new browser and not open that web page inside the application
Oct 30, 2007 02:58 PM|LINK
Hi Joseph,
Thanks a lot for your quick response and its helped me a lot
Thanks
nareshchowda...
Member
8 Points
80 Posts
Re: click on link, it should open new browser and not open that web page inside the application
Oct 30, 2007 03:00 PM|LINK
ShadowOfTheB...
Member
130 Points
68 Posts
Re: click on link, it should open new browser and not open that web page inside the application
Jun 04, 2008 05:32 AM|LINK
Hi Mike,
I tried to implement this as a hyperlink within the gridview and it opened up my details.aspx page within the same tab as my original page, so it did not exactly work?
how do i get it to open in a new tab rather than the Tab i am in...if you get my meaning so that i can have the original grid in one tab and the details page in another tab?
thanks here is my code:
<asp:gridview ID="gvbooks" runat="server">
<Columns>
<asp:TemplateField ItemStyle- horizontalAlign="Center">
<ItemTemplate>
<a id="lnkDetails" runat="server" target="_blank">details</a>// i was using a link button before so now i switched to a hyperlink..line below
<
asp:HyperLink id="lnkDetails" runat="server" Target="_blank" NavigateUrl="~/PMDetail.aspx">Details</asp:HyperLink></ItemTemplate>
<asp:TemplateField>
</Columns>
</asp:gridview >
William shakespeare, Hamlet
rsanuj
Member
9 Points
11 Posts
Re: click on link, it should open new browser and not open that web page inside the application
Apr 16, 2009 06:32 AM|LINK
hi,
You can aslo use below code:
<asp:HyperLink ID="lnkCompany" runat="server" onClick="window.open('http://www.ems-works.com/aboutus.aspx','mywindow','width=800,height=400,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes, resizable=yes')" Text="Home" Width="80px"></asp:HyperLink>hyperlink asp:hyperlink target _blank