If you have a database column that contains a URL and you want to make it appear in your GridView as a clickable hyperlink, change the GridView column to a Template Field, delete the textbox in there and add a Hyperlink control instead. Change the source to look like this:
<itemtemplate>
<asp:HyperLink id="HyperLink1"
runat="server" Text='<%# Bind("url") %>' NavigateUrl='<%# Bind("url") %>'></asp:HyperLink>
</itemtemplate>
0 comments
Post a Comment