473,382 Members | 1,563 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.

Simple DropDownList Databound Control

I've populated a DropDownList with information from SQL. I click a Search
Button on my Web Form that triggers the SelectedIndexChanged event.
However, the SelectedItem.Value still returns the first line item in the
dropdownlist, even though I've clicked on something else. I'm a newbie
here, what am I missing.
Nov 16 '05 #1
1 3733
Found it. The page load event was executing again which was reloading the
DropDownList. I added the IsPostBack and everything works great.

"Mike D" <md*****@nospambennettcompany.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
I've populated a DropDownList with information from SQL. I click a Search
Button on my Web Form that triggers the SelectedIndexChanged event.
However, the SelectedItem.Value still returns the first line item in the
dropdownlist, even though I've clicked on something else. I'm a newbie
here, what am I missing.

Nov 16 '05 #2

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

Similar topics

6
by: Dabbler | last post by:
I have a dropdownlist in a GridView ItemTemplate. I need to bind the ddl to an SqlDataSource, then have a value from a boundfield in the row be passed as the keyfield for select where clause. Im...
1
by: IMB | last post by:
I'm using VS2005 and am working with a ASP.NET 2.0 web site and I'm coding in VB.NET. I understand that I can add an item to a databound dropdownlist and make it the default selection using the...
1
by: DJ | last post by:
I have a DropDownList in Visual Web Developer that is databound to a SQL Database. Whenever the web page is opened the DropDownList is automatically filled with the first item in the table. My...
0
by: Mark Micallef | last post by:
Hi, I'm having a problem using a databound dropdownlist inside a reorderlist ajax control. Here's a snippet of the code I'm using: <InsertItemTemplate> <div class="insertArea">...
1
by: Mark Micallef | last post by:
Hi, this question relates to a control in the Ajax toolkit for asp.net 2. I'm having a problem using a databound dropdownlist inside a reorderlist ajax control. Here's a snippet of the code I'm...
3
by: dizzy77 | last post by:
I have a dropdownlist databound to table column with string values "n" i "y". <asp:DropDownList ID="ddlPrivate" runat="server" SelectedValue='<%# Bind("cPrivate") %>'> ...
2
by: Cirene | last post by:
In my databound datagrid i have a databound dropdownlist, like this: <asp:DropDownList ID="ddlAvail0" runat="server" SelectedValue='<%# Bind("AvailMon") %>'> <asp:ListItem></asp:ListItem>...
5
by: Cirene | last post by:
I seem to remember seeing a solution where a databound dropdownlist (used as a FILTER for a gridview) had the 1st item as "ALL ITEMS". It used a query with a UNION. But I can't find the example....
1
by: Brett | last post by:
I have a DropDownList in an ASP.NET web form that is populated with items from a lookup table by binding that DropDownList to a SqlDataSource. However, the items in the lookup table can change over...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...

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.