In the sample code below, how do I make the various text items in a datagrid
column have a clickable hyperlinks?
e.g. Ford Mustang
should be a link to www.mysite.com/mustang.htm
</head>
<%@ Page language="VB" Debug="true" %>
<%@ Import Namespace="Syst em.Data" %>
<%@ Import Namespace="Syst em.Data.OleDb" %>
<script language="VB" runat="server">
Sub Page_Load(Sende r as Object, E as EventArgs)
Dim oConn As OleDbConnection
Dim oComm As OleDbDataAdapte r
Dim sConn As String
Dim sComm As String
Dim oDataSet As New DataSet
'Build the connection string
sConn = "Provider=Micro soft.Jet.OLEDB. 4.0;"
sConn += "Data Source=D:\inetp ub\www\mysite\m yaccessdb.mdb;"
sConn += "Persist Security Info=False"
'Build the SQL string
sComm = "SELECT qryDataGrid01.* "
sComm += "FROM qryDataGrid01;"
'Create the connection and command objects
oConn = New OleDbConnection (sConn)
oComm = New OleDbDataAdapte r(sComm, oConn)
'Fill the dataset with the results of the query
oComm.Fill(oDat aSet, "qryDataGrid01" )
'Set the grid source to the dataset and bind the data
oGrid.DataSourc e=oDataSet.Tabl es("qryDataGrid 01").DefaultVie w
oGrid.DataBind( )
End Sub
</script>
<asp:DataGrid runat="server" id="oGrid" BackColor="#eee eee"
HorizontalAlign ="Left">
<HeaderStyle Font-Bold="True"/>
<AlternatingIte mStyle BackColor="Whit e" />
</asp:datagrid>
Comment