473,508 Members | 2,361 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DropDownList Issue with Firefox

Hi,

I have a page with several Textboxes and several DropDownList. When I click
on a 'save' button, it creates a record in a database.

The page works fine under Internet Explorer.

It does not work under FireFox. The dropdownlist are always selecting the
zero index value. If I debug and I stop the program in the page_load, the
dropdownlist are already set to zero index.

Anyone can help me?

Thanks,

Olivier
Nov 19 '05 #1
3 2904
Olivier, I can't speak to the browser differences, but if you're counting on
the fact that while the first item is shown it's not actually selected yet,
I'd suggest in the interests of usability you either: a) always select your
first item via code if it's the default or b) create a "select one" item as
the first item if there is no good default, and make sure it fails your
validation if the user doesn't change it.

I've always thought it odd there can be an item showing that's not really
selected, and it wouldn't surprise me for that to behave differently on
different browsers.

Bill

"Olivier Verdin" wrote:
Hi,

I have a page with several Textboxes and several DropDownList. When I click
on a 'save' button, it creates a record in a database.

The page works fine under Internet Explorer.

It does not work under FireFox. The dropdownlist are always selecting the
zero index value. If I debug and I stop the program in the page_load, the
dropdownlist are already set to zero index.

Anyone can help me?

Thanks,

Olivier

Nov 19 '05 #2
The point is not the usability.

The dropdownlist are selected depending on a value in a record in a
database.

DropDownList show the right value when first displayed. Then the user
changes one of the dropdownlist and click save. The system must take the
new selected value and update the record.

This work fine with IE not with Firefox. That's the issue.

Considerations on usability is not the point to my request. Thanks anyway
for your remark. It will perhaps help someone else.

The question is still open. What is the difference between IE and Firefox
in managing the dropdownlist?

Thanks for your help,

Olivier
"Bill Borg" <Bi******@discussions.microsoft.com> wrote in message
news:B4**********************************@microsof t.com...
Olivier, I can't speak to the browser differences, but if you're counting on the fact that while the first item is shown it's not actually selected yet, I'd suggest in the interests of usability you either: a) always select your first item via code if it's the default or b) create a "select one" item as the first item if there is no good default, and make sure it fails your
validation if the user doesn't change it.

I've always thought it odd there can be an item showing that's not really
selected, and it wouldn't surprise me for that to behave differently on
different browsers.

Bill

"Olivier Verdin" wrote:
Hi,

I have a page with several Textboxes and several DropDownList. When I click on a 'save' button, it creates a record in a database.

The page works fine under Internet Explorer.

It does not work under FireFox. The dropdownlist are always selecting the zero index value. If I debug and I stop the program in the page_load, the dropdownlist are already set to zero index.

Anyone can help me?

Thanks,

Olivier

Nov 19 '05 #3

The selected index is not yet set in Page_Load because ViewState hasn't been
restored/merged; so you can't read it there. You must attach a
SelectedIndexChanged event handler to your drop down list and read the new
value there.

-Oleg.

"Olivier Verdin" <ol************@playcorporate.com> wrote in message
news:Ob**************@TK2MSFTNGP09.phx.gbl...
Hi,

I have a page with several Textboxes and several DropDownList. When I
click
on a 'save' button, it creates a record in a database.

The page works fine under Internet Explorer.

It does not work under FireFox. The dropdownlist are always selecting the
zero index value. If I debug and I stop the program in the page_load, the
dropdownlist are already set to zero index.

Anyone can help me?

Thanks,

Olivier

Nov 19 '05 #4

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

Similar topics

0
1140
by: Penny Bond | last post by:
Hello, Have an asp.net page that has a number of textboxes, dropdownlists, buttons, datagrid and custom validators on it. In all dropdownlists on the page, I have approximately 20 Here is...
1
4400
by: Paul L | last post by:
Hi, I have an issue with the OnSelectedIndexChanged event not firing for a DropDownList control which is in the ItemTemplate of a DataList. I have made an exact copy of the DropDownList control,...
5
2383
by: sri | last post by:
I have a usercontrol that has the dropdownlist which has Autopostback set to true. The selectedindex changed event is not getting fired from IE if the production webserver has ASP.NET 1.1.4322.573...
1
2662
by: Alex D. | last post by:
hey guys I found what is causing the problems with my treeview in Firefox...the answer is: treeview+dropdwonlist in the same page dont work! try this simple code and see for yourselves. you can do...
1
2019
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...
3
6967
by: Klaas | last post by:
Hi, Is it possible to get the text in a dropdown list to be bold or italic? Some entries I want to have bold others normal and others italic. I cant figure out how to do this. tia
11
4448
by: harold.gimenez | last post by:
Hi group, I am trying to change the selection of an ASP Dropdownlist just like "Orange" is selected here: http://www.w3schools.com/js/tryit.asp?filename=try_dom_option_selected The...
3
5517
by: mwalts | last post by:
I'm fairly new to ASP.NET, although I have a fair amount of C# experience. I'm creating a SharePoint Web Part, but I'm doing the development for it locally in ASP.NET 1.1 I'm using a...
5
37894
by: ssmeshack | last post by:
Hi All, Im using VWD 2008 (c#), I have a question here. Im having a dropdownlist like this: <asp:DropDownList ID="ddlIssue" runat="server" AutoPostBack="True" ...
0
7223
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
7377
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
7489
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5624
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4705
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1547
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
414
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.