Hyperlink field in grid view

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
 
M

Munna

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top