Here is my item in the html:
I'd like to set AthleteName to be FirstName and LastName concatenated. I grab those values in the code behind, on the page load, like this:
I'd like to manipulate the two values that are returned and set them to be the AthleteName datagrid item...
Code:
<asp:BoundColumn DataField="AthleteName" HeaderText="Athlete Name">
<HeaderStyle CssClass="dgHeader"></HeaderStyle>
<ItemStyle Wrap="False"></ItemStyle>
</asp:BoundColumn>
I'd like to set AthleteName to be FirstName and LastName concatenated. I grab those values in the code behind, on the page load, like this:
Code:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
BindDataGrid(lblMsg, dgAthletes, conString, "admin_GetallAthletes", "", "")
End Sub
Public Sub BindDataGrid(ByVal lbl As Label, ByVal dg As DataGrid, ByVal cs As String, ByVal sp As String, ByVal p As String, ByVal pv As String)
Dim oConn As SqlConnection
Dim myCommand As SqlCommand
oConn = New SqlConnection(cs)
oConn.Open()
myCommand = New SqlCommand(sp, oConn)
myCommand.CommandType = CommandType.StoredProcedure
If p <> "" Then
myCommand.Parameters.Add(New SqlParameter(p, SqlDbType.Int))
myCommand.Parameters(p).Value = pv
End If
dg.DataSource = myCommand.ExecuteReader
dg.DataBind()
oConn.Close()
End Sub
I'd like to manipulate the two values that are returned and set them to be the AthleteName datagrid item...