|
Subject:
|
Input javascript variable into hyperlink column
|
|
Posted By:
|
toddw607
|
Post Date:
|
4/17/2008 7:16:17 AM
|
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: <asp:TemplateColumn headertext="Fig & Index Number">
<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
|
|
Reply By:
|
toddw607
|
Reply Date:
|
4/17/2008 10:12:56 AM
|
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:
<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.
|