473,397 Members | 2,116 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Getting value of field in dropdown datasource within Formview

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 help with any suggestions??

Jun 19 '06 #1
0 1805

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: DC Gringo | last post by:
I have a dropdownlist that, upon form submission, I'd like to maintain the selected value when I get my result...how do I do that? <asp:dropdownlist Font-Size="8" id="ddlCommunities"...
6
by: Jenna Alten | last post by:
I have a datagrid with a template column that contains a dropdown list. I currently fill and display the dropdown list on the page load. This is working correctly. I am NOT using an Edit Column. I...
1
by: Craig | last post by:
In ASP.NET 2.0 and the formview control how do you get the value of the identity field of a newly inserted record? In ASP.NET 1.1 after the new record was saved you just said intNewIdentityID =...
1
by: Jay | last post by:
On my aspx page I have a FormView with a RadioButtonList bound to a column on a DataSource table. The form starts up in Edit mode. I want the formView to start up with nothing yet selected in the...
1
by: Ben | last post by:
I have a formview with a few dropdownlists (software version, database version, etc). When a software version is selected, the database version dropdownlist updates itself accordingly. When in...
3
by: Dave | last post by:
I have 2 Dropdown's in a Web FormView. I would like to get one to be a Parameter for the other, but I can't seem to figure out how to get the value out of the first. When I double click it to get...
8
by: BB | last post by:
Hi, I am using FormView Contol, TextBox (Hidden ) and Submit button whose caption is "View Page" in my aspx page. Here is what I am tryin to do.When page loads I generate dynamic url in text box...
2
by: Hugh | last post by:
Naive developer needs help. how to retrieve a dropdown value inside a formview in VB? Is findcontrol the way to go? Thanks in advance. Hugh
3
by: John | last post by:
I have two dropdown lists that I have bound to a datatable and set the DataTextField and DataValueField for. Both lists show the values I expect from the database. However, when I need to access...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.