How to Show working links in Gridview?

Dominia's Avatar, Join Date: Dec 2008
Newbie Member
I have an XML file as the datasource. It has link titles as well as URL's. I need to display just the link names in a gridview, and have them work according to the corresponding URL's. Basically the user should see only the name of a link and be able to click on it and go to its destination. Each link has a different destination. I am not sure how to do this?
I also need to be able to display an image to the left of each link. This image will be the same for all links and will not be clickable.

Lastly, I need the links split up so that they appear in two columns next to each other. So this means half of them will be in column 1 for example, and the other half in cloumn 2.
Thank you :-)
mail2kumaranjani's Avatar, Join Date: Jun 2010
Newbie Member
In Gridview use sqldatasource and add imagefield and set dataimageurlfiled of you database where path of image has stored it will display image on grid. now if you want to see details some thing then add hyperlink in grid and set navigationurl detail will show after clicking image
alia123's Avatar, Join Date: Jan 2016
Hey, try this code :-

<asp:hyperlinkfield headertext="NewsHeadline"
datanavigateurlformatstring="http://{0}" />