|
-
Jun 20th, 2002, 03:28 AM
#1
Thread Starter
Lively Member
Converting text field into hyperlink.
Hi All,
I am trying to write some code that will output a number of fields to a datagrid not a problem. The twist is i need one of these columns output which is text converted to hyperlinks, and viewed as such in the datagrid. I then need to be able to click on a hyperlink and run code against that action accordingly. Heres my code so far:
Thanks In Advance as always!
dean
Dim sConnString As String = ConfigurationSettings.AppSettings("connectionString")
Dim myCon As New OleDbConnection(sConnString)
Dim myRow As System.Data.DataRow
Dim myDS As New DataSet()
myCon.Open()
Dim myCommand As OleDbDataAdapter
myCommand = New OleDbDataAdapter("Select * from forum", sConnString)
myCommand.Fill(myDS, "forum")
myRow = myDS.Tables("forum").Rows(0)
For Each myRow In myDS.Tables("Forum").Rows
Dim usrPassword = myRow("userPassword")
Dim usrName = myRow("userName")
Dim strUserPassword As String
strUserPassword = pwdTextBox.Text
Dim strUserName As String
strUserName = usrTextBox.Text
If usrPassword = strUserPassword And usrName = strUserName Then
myDS.Tables(0).Columns.Remove("userPassword")
DataGrid1.DataSource = myDS.Tables("forum").DefaultView
DataGrid1.DataBind()
End If
Next
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|