Hyperlink field in grid view

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

I have a grid view bound to an SqlDataSource. One of the fields in grid view
is a hyperlink field. How can I set the hyperlink field's navigationurl to
the value of a field coming form the underlying SqlDataSource?

Thanks

Regards
 
Hi

I have a grid view bound to an SqlDataSource. One of the fields in grid view
is a hyperlink field. How can I set the hyperlink field's navigationurl to
the value of a field coming form the underlying SqlDataSource?

Thanks

Regards

Hi

add a template field


<asp:TemplateField HeaderText="Url"
SortExpression="value">
<ItemTemplate>
<asp:HyperLink ID="HyperLink1" runat="server"
NavigateUrl='<%# Eval("value") %>' Target="_blank"
Text='<%# Eval("value") %>'></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>

Best of luck

Munna
www.munna.shatkotha.com
www.munna.shatkotha.com/blog
www.shatkotha.com
 
Back
Top