By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,188 Members | 1,004 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,188 IT Pros & Developers. It's quick & easy.

DropDownList Issue with Firefox

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a

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 discussion thread is closed

Replies have been disabled for this discussion.