I have recently joined to this forum. I am new to ASP.Net Developement.
I have a Gridview and i have added a hyperlink field to that. its working file. I am able to open the page as a seperate window. But my problem is, when i open the new window the address bar, buttons and browser menu appears. I want to hide these options.
I believe this is possible through javascript. But i dont know how to open the window using javascipt. The following is the piece of code.
MadhukarH
0 Points
5 Posts
Hyperlink field in grid view
Jul 05, 2007 02:06 PM|LINK
Hello Everyone,
I have recently joined to this forum. I am new to ASP.Net Developement.
I have a Gridview and i have added a hyperlink field to that. its working file. I am able to open the page as a seperate window. But my problem is, when i open the new window the address bar, buttons and browser menu appears. I want to hide these options.
I believe this is possible through javascript. But i dont know how to open the window using javascipt. The following is the piece of code.
<
asp:HyperLinkField DataTextField="ItemCode" HeaderText="ItemCode" datanavigateurlfields="code" datanavigateurlformatstring="Description.aspx?code={0}" Target="_blank" />Can anyone help me to open the Description.aspx in a seperate page without browser buttons,menus...
Thanks in advance,
Madhu
asp.net 2.0 gridview hyperlinkfield
Razor
Participant
1110 Points
206 Posts
Re: Hyperlink field in grid view
Jul 05, 2007 02:46 PM|LINK
This is from a website I did a while ago, this is the exact code (opens a windows with no buttons)
<asp:HyperLinkColumn DataNavigateUrlField="ID" DataNavigateUrlFormatString="javascript:var w=window.open('editlicense.aspx?SOFTID={0}','','width=400,height=150,top=294,left=262,location=no,titlebar=no,menubar=no,status=no,toobar=no,resizable=no,scrollbars=no');" DataTextField="License" HeaderText="Licenses">Cheers,
Mark
ecbruck
All-Star
98783 Points
9691 Posts
Moderator
Re: Hyperlink field in grid view
Jul 05, 2007 03:01 PM|LINK
<asp:hyperlinkfield datanavigateurlfields="code" datanavigateurlformatstring="javascript:var popup = window.open('Description.aspx?code={0}', 'Popup', 'toolbar=no');" datatextfield="ItemCode" headertext="ItemCode" />Microsoft MVP - ASP.NET
ecbruck
All-Star
98783 Points
9691 Posts
Moderator
Re: Hyperlink field in grid view
Jul 05, 2007 03:19 PM|LINK
Or try this:
ASPX
<asp:templatefield headertext="ItemCode"> <itemtemplate> <asp:hyperlink id="HyperLink1" runat="server" navigateurl='<%# GetNavigateUrl(Eval("Code").ToString()) %>' text='<%# Eval("ItemCode") %>' /> </itemtemplate> </asp:templatefield>CODE-BEHIND
Microsoft MVP - ASP.NET
MadhukarH
0 Points
5 Posts
Re: Hyperlink field in grid view
Jul 06, 2007 04:16 AM|LINK
Hello Ed,
Thanks for the Reply. It really works like a dream. Thanks a lot [:)]
umairmoghal
Member
88 Points
21 Posts
Re: Hyperlink field in grid view
Jul 25, 2007 07:59 PM|LINK
Thanx a lot ...... i was facing the same problem and I was messing with this for 2 hours. Now it is solved in just 2 minutes.......[:)] Thanks again.
Senior Software Engineer
ZIN Technologies
------------------------------
Please remember to click “Mark as Answer” on the post that helps you.
umairmoghal
Member
88 Points
21 Posts
Re: Hyperlink field in grid view
Jul 25, 2007 08:10 PM|LINK
Thanx a lot ...... i was facing the same problem and I was messing with this for 2 hours. Now it is solved in just 2 minutes.......[:)] Thanks again.
Senior Software Engineer
ZIN Technologies
------------------------------
Please remember to click “Mark as Answer” on the post that helps you.