How to Show working links in Gridview?

Discussion in 'ASP' started by Dominia, Dec 9, 2008.

  1. Dominia

    Dominia New Member

    Joined:
    Dec 9, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi,
    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 :)
     
  2. mail2kumaranjani

    mail2kumaranjani New Member

    Joined:
    Jun 18, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    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
     
  3. alia123

    alia123 New Member

    Joined:
    Jan 8, 2016
    Messages:
    65
    Likes Received:
    5
    Trophy Points:
    0
    Hey, try this code :-

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

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice