K
kieran
Hi,
i know this should be easy but cant get it exactly right.
i have a Datagrid pulling results from a stored proc in database, it
outputs four columns, one of which is an email address column. i am
trying to get all the email addresses to be clickable email links
using the mailto: scenerio but am having trouble with code as im a
newbie.
i have looked for examples but nothing quite fits. As you can see from
code i have been messing with 'ds.Tables(0).Columns'. Is this the best
way to do it? Where am i going wrong?
All help very much appreciated.
Dim daPhone As New SqlClient.SqlDataAdapter
daPhone.SelectCommand = New SqlClient.SqlCommand
daPhone.SelectCommand.Connection = con
daPhone.SelectCommand.CommandText =
"TEST_OUTPUT_FIRSTNAME"
daPhone.SelectCommand.CommandType =
CommandType.StoredProcedure
daPhone.SelectCommand.Parameters.Add(workParam)
Dim ds As DataSet
ds = New DataSet
daPhone.Fill(ds, "tblPhone")
Dim col As DataColumn
For Each col In ds.Tables(0).Columns("email")
lstItems.Items.Add(col.ColumnName)
Next
dgPhone.DataSource = ds
dgPhone().DataBind()
i know this should be easy but cant get it exactly right.
i have a Datagrid pulling results from a stored proc in database, it
outputs four columns, one of which is an email address column. i am
trying to get all the email addresses to be clickable email links
using the mailto: scenerio but am having trouble with code as im a
newbie.
i have looked for examples but nothing quite fits. As you can see from
code i have been messing with 'ds.Tables(0).Columns'. Is this the best
way to do it? Where am i going wrong?
All help very much appreciated.
Dim daPhone As New SqlClient.SqlDataAdapter
daPhone.SelectCommand = New SqlClient.SqlCommand
daPhone.SelectCommand.Connection = con
daPhone.SelectCommand.CommandText =
"TEST_OUTPUT_FIRSTNAME"
daPhone.SelectCommand.CommandType =
CommandType.StoredProcedure
daPhone.SelectCommand.Parameters.Add(workParam)
Dim ds As DataSet
ds = New DataSet
daPhone.Fill(ds, "tblPhone")
Dim col As DataColumn
For Each col In ds.Tables(0).Columns("email")
lstItems.Items.Add(col.ColumnName)
Next
dgPhone.DataSource = ds
dgPhone().DataBind()