473,387 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Hyperlink field in grid view

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
Jun 27 '08 #1
1 1890
On Jun 2, 9:20 am, "John" <i...@nospam.infovis.co.ukwrote:
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
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Paul | last post by:
Hi I have a data grid with a hyperlink column. the colum has numbers like 00001,000002, ect. Just wondering how to get the text value of the cell as tempstring =...
2
by: Jason | last post by:
I have a data grid with a hyperlink column. The hyperlink is created by a class that extracts the link from an XML Document. How can I populate the hyperlink column in the data grid with the...
3
by: shapper | last post by:
Hello, In my GridView I have a HyperLink Field where I set the DataNavigateUrlFormaString MyHyperLinkField.DataNavigateUrlFormatString = "~\RSS.ashx?Channel={0}&Culture=" &...
1
by: =?Utf-8?B?Ym9iYnk=?= | last post by:
Using ASP.Net 2.0 and VS 2005. One of the GridView columns is a bound HyperLink that sends me to a new aspx page. I bound it's DataText property with some field in the database.when I click this...
2
by: mdock | last post by:
Hello, I have a javascript grid on my ASP page which displays information about the history of specific units produced in our manufacturing facility. One of the results is the order number on...
3
by: jagguy | last post by:
I have a column on a grid view I read in froma DB. The field has 2 values true or false. Now if i click on the field i want the gridview and the DB updated to the new value. I click on true on a...
2
by: jagguy | last post by:
I have a column on a grid view I read in froma DB. The field has 2 values true or false. Now if i click on the field i want the gridview and the DB updated to the new value. I click on true on a row...
0
by: John | last post by:
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...
3
by: John | last post by:
Hi In a bound grid view I have the following hyperlink field; <asp:HyperLinkField DataNavigateUrlFields="FldDirections" DataNavigateUrlFormatString="{0}" HeaderText="Directions"...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.