Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 17th, 2008, 07:16 AM
Authorized User
 
Join Date: Feb 2007
Location: Binghamton, NY, USA.
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to toddw607 Send a message via Yahoo to toddw607
Default Input javascript variable into hyperlink column

Hi all,
      I think this is much simpler than I am making it out to be. I have a aspx page consisting of 2 frames and one of the frames includes the following aspx code:
         
Code:
       <asp:TemplateColumn headertext="Fig & Index Number">
Code:
                 <itemtemplate>
                   <asp:hyperlink runat="server" text='<%# DataBinder.Eval(Container.DataItem, "Ind") %>' navigateurl='<%# "Figure44.aspx" & TotalURL & DataBinder.Eval(Container.DataItem, "Ind") %>' id="Hyperlink3" target="_parent" name="Hyperlink3" /> 
                 </itemtemplate>
                 </asp:TemplateColumn>


     Where it displays "Figure44.aspx", I want that to be the parent frame. I would rather not use a session variable due to the amount of pages I have. I was thinking of using parent.location.href but I'm not absolutely sure how to pass it. Any insight would be much appreciated. TIA

 
Old April 17th, 2008, 10:12 AM
Authorized User
 
Join Date: Feb 2007
Location: Binghamton, NY, USA.
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to toddw607 Send a message via Yahoo to toddw607
Default

Figured it out. I had to use an <a href tag within my Datagrid and call a javascript method to open the window. Here is the layout is anyone else gets caught:
Code:
<asp:Templatecolumn headertext = "Fig & Index Number">
                  <itemtemplate>
                      <a href="javascript:geturl('<%= TotalURL %>', <%# DataBinder.Eval(Container.DataItem, "Ind")%>)"><%# DataBinder.Eval(Container.DataItem, "Ind") %></a>
                  </itemtemplate>
                 </asp:Templatecolumn>

    Thanks to all who read this.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Hyperlink column Komila .NET Framework 2.0 3 May 19th, 2007 02:40 AM
Hyperlink Column Komila ASP.NET 2.0 Basics 2 April 9th, 2007 10:13 PM
Datagrid Button/Hyperlink Column snowydust VB How-To 0 September 6th, 2004 02:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.