Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Getting value of field in Dropdown List within Formview

Reply
Thread Tools

Getting value of field in Dropdown List within Formview

 
 
TJHerman
Guest
Posts: n/a
 
      06-19-2006
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("CompanyNameTextbo x"),Textbox)
-txtCompanyName.text = ddlCompanyName.Items(ddlCompanyName.SelectedIndex) .Text

But how can I get the value from a different field in the datasource?

Please suggest!!!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
javascript validation for a not required field, field is onlyrequired if another field has a value jr Javascript 3 07-08-2010 10:33 AM
Copy File Field Value to Dynamic File Field Value VUNETdotUS Javascript 25 11-10-2007 10:36 AM
Formview within Formview Chris ASP .Net 0 05-19-2007 04:12 PM
Saving data from a dropdown list in FormView?? Jerome ASP .Net 1 06-28-2006 06:39 AM
Getting value of field in dropdown datasource within Formview =?Utf-8?B?VEpIZXJtYW4=?= ASP .Net 0 06-19-2006 06:18 PM



Advertisments