T
TJHerman
I have a dropdown list in a Formview that includes a number of fields in the
SQLDatasource.
I want to be able to get the value of one of the fields in the Datasource
that is not the Datatextfield or the Datavaluefield from within a Formview
control.
I know that I can get the data text field or datavalue field by using the
following:
-Dim ddlCompanyName as DropDownList
-Dim txtCompanyName as Textbox
-ddlCompanyName = CType(FormView1.Row.FindControl("ddlCompanyName"),
DropDownList)
-txtCompanyName =
CType(FormView1.Row.findcontrol("CompanyNameTextbox"),Textbox)
-txtCompanyName.text = ddlCompanyName.Items(ddlCompanyName.SelectedIndex).Text
But how can I get the value from a different field in the datasource?
Please suggest!!!
SQLDatasource.
I want to be able to get the value of one of the fields in the Datasource
that is not the Datatextfield or the Datavaluefield from within a Formview
control.
I know that I can get the data text field or datavalue field by using the
following:
-Dim ddlCompanyName as DropDownList
-Dim txtCompanyName as Textbox
-ddlCompanyName = CType(FormView1.Row.FindControl("ddlCompanyName"),
DropDownList)
-txtCompanyName =
CType(FormView1.Row.findcontrol("CompanyNameTextbox"),Textbox)
-txtCompanyName.text = ddlCompanyName.Items(ddlCompanyName.SelectedIndex).Text
But how can I get the value from a different field in the datasource?
Please suggest!!!