473,326 Members | 2,337 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,326 software developers and data experts.

Problem in displaying selected value of dropdownlist box

Hi all

I m displaying locations from database in the dropdownlist box using C# .Its displaying all locations properly but when i select loacation from dropdown it is always displaying first item say Bhopal as selected and but i want to select any item it is not getting selected. Can anybody pls tell me what might be the reason?
May 28 '07 #1
1 1139
dip_developer
648 Expert 512MB
Hi all

I m displaying locations from database in the dropdownlist box using C# .Its displaying all locations properly but when i select loacation from dropdown it is always displaying first item say Bhopal as selected and but i want to select any item it is not getting selected. Can anybody pls tell me what might be the reason?
is it a windows application????
I think may be you have made SelectedIndex to 0(or the index corresponds to "Bhopal") in the SelectedIndexChanged Event of your dropdownlist.

please check it...
May 28 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Kalyani | last post by:
Hi, I have a page with one DropDownList and a Placeholder.This placeholder wil contain either a textbox or a DropDownList depending upon the value in previous DropDownList. Also there is a Submit...
6
by: Robin Bonin | last post by:
In my user contol I am creating a set of dropdownlists. Each list is created based on input from the other lists. The problem I am having is setting the selected index on the lists. If someone...
5
by: Vigneshwar Pilli via DotNetMonster.com | last post by:
string connectionString1 = "server=(local); user=sa;password=sa; database=sonic"; System.Data.SqlClient.SqlConnection dbConnection1 = new System.Data.SqlClient.SqlConnection(connectionString1);...
1
by: tshad | last post by:
I have a dropdown list set up to show 4 items on screen. If you select an item below that 4, it will not display on the screen (but it is selected). When you postback the list shows the first...
1
by: Kalyani | last post by:
Hi, I have a page with one DropDownList and a Placeholder.This placeholder wil contain either a textbox or a DropDownList depending upon the value in previous DropDownList. Also there is a Submit...
2
by: Antonio D'Ottavio | last post by:
Good morning, I've a problem with a dropdownlist located inside any row of a datalist, I fill both datalist and dropdownlist at runtime, the problem is with the dropdownlist infact using the event...
2
by: Mike Collins | last post by:
I cannot get the correct drop down list value from a drop down I have on my web form. I get the initial value that was loaded in the list. It was asked by someone else what the autopostback was...
4
by: ^MisterJingo^ | last post by:
Hi all, I have a web page which has a single dropdownlist containing 3 items. Below the dropdownlist are two listboxes. Depending on the option selected from the dropdownlist, the left most...
6
by: Zeba | last post by:
Hi, I have a page with a calendar and two datalist items - one containing month values and the other, year values. Depending on the month/year value chosen ( in text/string format ) I should be...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.