tcottrill
asked on
Appending Query String Value to URL in Gridview HyperlinK Field
Here's my issue. I'm passing a value to the page called degree IIe: page.aspx?degree=1
and I need to append it to the NavigateURL value of a hyperlink field in a Gridview.
I've thrown everything at it I can think of. Thanks in advance for your help.
and I need to append it to the NavigateURL value of a hyperlink field in a Gridview.
I've thrown everything at it I can think of. Thanks in advance for your help.
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
CellPadding="4" DataKeyNames="InterestID" DataSourceID="SqlDataSource1"
ForeColor="#333333" GridLines="None">
<RowStyle BackColor="#E3EAEB" />
<Columns>
... <asp:HyperLinkField NavigateUrl="DegreesToInterest.aspx"
Text="ManageInterests" />
</Columns>
...
</asp:GridView>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<asp:HyperLinkField NavigateUrl='<%# value() %>' Text="ManageInterests" />
Code Behind
Public Property Value() as string
Then assign the url into the value property. Hope that makes sense. :)