473,382 Members | 1,389 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,382 software developers and data experts.

DropDownList problems

I want to use the selected value of a drop down list to filter a data source.
When i have done this before i have used a DataSourceControl and i have just
made the drop down a control parameter, which works well. However this time
i need to combine a set of results from two databases into a single data
source so i need to use ADO to do it. The problem i come up against is that
until the value in the drop ,down box is changed, the SelectedValue property
does not seem to exist (or is set to null). I have tried setting the
SelectedIndex to a default value, and this work in so far as that index is
selected in the drop down list on the screen, however the SelectedValue
property is still null.

How do i get the vlue that is selected by default in a drop down list,
before anyone selects a different value. This just works with DataSource
controls and control parameters but you can't seem to add a controlparameter
to a ADO DataCommands Parameters collection.
Jul 18 '06 #1
1 1036
clickon <cl*****@discussions.microsoft.com>'s wild thoughts
were released on Tue, 18 Jul 2006 04:20:02 -0700 bearing the
following fruit:
>I want to use the selected value of a drop down list to filter a data source.
When i have done this before i have used a DataSourceControl and i have just
made the drop down a control parameter, which works well. However this time
i need to combine a set of results from two databases into a single data
source so i need to use ADO to do it. The problem i come up against is that
until the value in the drop ,down box is changed, the SelectedValue property
does not seem to exist (or is set to null). I have tried setting the
SelectedIndex to a default value, and this work in so far as that index is
selected in the drop down list on the screen, however the SelectedValue
property is still null.
That's odd because that's exactly what I do, and the
selectedvalue *does* contain the correct value, perhaps you
could post some code?

J
>How do i get the vlue that is selected by default in a drop down list,
before anyone selects a different value. This just works with DataSource
controls and control parameters but you can't seem to add a controlparameter
to a ADO DataCommands Parameters collection.


Jan Hyde (VB MVP)

--
We got divorced because of illness;
We got sick of each other. (Henny Youngman)

Jul 19 '06 #2

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

Similar topics

2
by: Benedict Teoh | last post by:
I created a dropdownlist containing day, month and year field and expose a property to assign a date. When I call from a aspx page and assign the value, the new date is not displayed until a submit...
1
by: Michael Kolias | last post by:
Hi everybody, I am having a problem getting the selected value of a drop down list that is populated dynamically inside a datagrid control. When I try to access the selected item on the...
2
by: COHENMARVIN | last post by:
I'm leafing through a big book on asp.net, and I don't see any way to the following: 1. bind values and text to a dropdown 2. Also make the first line of the dropdown say something different. For...
0
by: Fabrizio | last post by:
Hi all. I have a field in a gridview as templatefield which is a label in view mode and a dropdownlist in edit mode with his datasource. This gridview is inserted as templatefield in another...
3
by: =?Utf-8?B?Y21lZWsxXzE5OTk=?= | last post by:
Hello, On a webpage, create an UpdatePanel with two DropDownLists. Set AutoPostBack of DropDownList1 to true. In the SelectedIndexChanged method, refill DropDownList2 and set the focus to...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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...

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.