I have a gridView control. I want to show the page URL in the GridView as a Link in C#.
For example
My URL:
http://www.c-sharpcorner.com/Forums/AddPost.aspx?TSource=AddPost
Show that url in the GridView as a column with hyperlink.
How to create a link in GridView
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Amit ChoudharyRank #145 · 15.8K reputationPosted Apr 12, 2011, 11:15 PM EDT
use the template column and use the asp.net hyperlink control to show your link there.
DataNavigateUrlFormatString="LabelDetails.aspx?LabelID={0}"
Text="Details..." />
Hope this helps you.
Thanks.
Ankit NandekarRank #703 · 3.4K reputationPosted Apr 12, 2011, 11:29 PM EDT
with in a gridview write
CrishRank #1,487 · 1.1K reputationPosted Apr 13, 2011, 3:15 AM EDT