zoidberg84
Programmer
hello all, i am using Microsoft Access 2003 and ASP.net as my language and i have made a connection to my database but inside the database is a table called picture, with a field called Pic_File, Pic_File has an address for a location of the picture (which i have set as a hyperlink)!
my problem is that i can get the address to display on my web page but i dont know how to actually make it a hyperlink to show that picture!?
here is my code to make the connection and display the results:
I ideally want to hide the actual hyperlink and replace it with some text (eg. cheese picture) but use the hyperlink to access the picture!
cheers for any help
my problem is that i can get the address to display on my web page but i dont know how to actually make it a hyperlink to show that picture!?
here is my code to make the connection and display the results:
Code:
<asp:GridView ID="Gridview1" runat="server" AutoGenerateColumns="false" BackColor="#FFFF99" BorderColor="black" BorderStyle="Solid" BorderWidth="1px" Width="100%" DataKeyNames="ID" DataSourceID="SqlDataSource1" AllowSorting="true" AllowPaging="true">
<HeaderStyle HorizontalAlign="Left" />
<Columns>
<asp:BoundField DataField="ID" HeaderText="ID" SortExpression="ID" />
<asp:BoundField DataField="Pic_Name" HeaderText="Picture name" SortExpression="Pic_Name" />
<asp:BoundField DataField="Pic_File" HeaderText="File name" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:db1ConnectString %>"
ProviderName="<%$ ConnectionStrings:db1ConnectString.ProviderName %>" SelectCommand="SELECT * FROM picture">
</asp:SqlDataSource>
I ideally want to hide the actual hyperlink and replace it with some text (eg. cheese picture) but use the hyperlink to access the picture!
cheers for any help