J
Jonathan
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="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<script language="VB" runat="server">
Sub Page_Load(Sender as Object, E as EventArgs)
Dim oConn As OleDbConnection
Dim oComm As OleDbDataAdapter
Dim sConn As String
Dim sComm As String
Dim oDataSet As New DataSet
'Build the connection string
sConn = "Provider=Microsoft.Jet.OLEDB.4.0;"
sConn += "Data Source=D:\inetpub\www\mysite\myaccessdb.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 OleDbDataAdapter(sComm, oConn)
'Fill the dataset with the results of the query
oComm.Fill(oDataSet, "qryDataGrid01")
'Set the grid source to the dataset and bind the data
oGrid.DataSource=oDataSet.Tables("qryDataGrid01").DefaultView
oGrid.DataBind()
End Sub
</script>
<aspataGrid runat="server" id="oGrid" BackColor="#eeeeee"
HorizontalAlign="Left">
<HeaderStyle Font-Bold="True"/>
<AlternatingItemStyle BackColor="White" />
</asp: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="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<script language="VB" runat="server">
Sub Page_Load(Sender as Object, E as EventArgs)
Dim oConn As OleDbConnection
Dim oComm As OleDbDataAdapter
Dim sConn As String
Dim sComm As String
Dim oDataSet As New DataSet
'Build the connection string
sConn = "Provider=Microsoft.Jet.OLEDB.4.0;"
sConn += "Data Source=D:\inetpub\www\mysite\myaccessdb.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 OleDbDataAdapter(sComm, oConn)
'Fill the dataset with the results of the query
oComm.Fill(oDataSet, "qryDataGrid01")
'Set the grid source to the dataset and bind the data
oGrid.DataSource=oDataSet.Tables("qryDataGrid01").DefaultView
oGrid.DataBind()
End Sub
</script>
<aspataGrid runat="server" id="oGrid" BackColor="#eeeeee"
HorizontalAlign="Left">
<HeaderStyle Font-Bold="True"/>
<AlternatingItemStyle BackColor="White" />
</asp:datagrid>