Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > DropDownList "SelectedIndexChanged" event

Reply
Thread Tools

DropDownList "SelectedIndexChanged" event

 
 
Greg Smith
Guest
Posts: n/a
 
      11-12-2003
I am working on my first web app. The SelectedIndexChanged event for the
DropDownList control doesn't seem to fire when the item is changed.
Obviously there is something more I need to do. Can anybody fill me in?

Any help is greatly appreciated.


 
Reply With Quote
 
 
 
 
helper of codes
Guest
Posts: n/a
 
      11-12-2003

I had the same problem. You need to set the autopostback on the listbox
control parameters. You need to send the page back to the server to
respond to the event.

You would think this would happen automatically with the event but it
doesn't. Apparently it is intended to leave that processing control in
your hands to determine when to cause an autopostback.....

Hope this helps move you on your way....


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
Greg Smith
Guest
Posts: n/a
 
      11-12-2003
Thanks!

"helper of codes" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>
> I had the same problem. You need to set the autopostback on the listbox
> control parameters. You need to send the page back to the server to
> respond to the event.
>
> You would think this would happen automatically with the event but it
> doesn't. Apparently it is intended to leave that processing control in
> your hands to determine when to cause an autopostback.....
>
> Hope this helps move you on your way....
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
Pai
Guest
Posts: n/a
 
      11-12-2003
"Greg Smith" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> I am working on my first web app. The SelectedIndexChanged event for the
> DropDownList control doesn't seem to fire when the item is changed.
> Obviously there is something more I need to do. Can anybody fill me in?
>
> Any help is greatly appreciated.


u need to set the AutoPostBack Propoerty of the control to true......
 
Reply With Quote
 
MSFT
Guest
Posts: n/a
 
      11-13-2003
Hello,

For this issue, you may refer to following article:

PRB: AutoPostBack for the DropDownList Control May Not Work as Expected
WGID:445
http://support.microsoft.com/default...;EN-US;Q822317

Hope this help,

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

 
Reply With Quote
 
Greg Smith
Guest
Posts: n/a
 
      11-13-2003
> I had the same problem. You need to set the autopostback on the listbox
> control parameters. You need to send the page back to the server to
> respond to the event.
>
> You would think this would happen automatically with the event but it
> doesn't. Apparently it is intended to leave that processing control in
> your hands to determine when to cause an autopostback.....


Opps! just ran into another problem. I am loading the DropDownList in the
Page_load event. When I click on the control it posts back and fires the
page_load event and I double up on the items listed in the control. If I
put a "Clear" in there first then it looks fine but I have lost my
selection. It is back at an index of 0;

Is there a better way of doing this?


 
Reply With Quote
 
MSFT
Guest
Posts: n/a
 
      11-14-2003
Hi Greg,

You can determine if the the page is postback or not, and then deside if
add the items again. For example:

If not IsPostBack then
...

End If

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DropDownList inside GridView: How to set SelectedIndex for the DropDownList? keithb ASP .Net 1 11-01-2006 05:24 AM
GridView: Filter DropDownList for another DropDownList =?Utf-8?B?SnVhbmpv?= ASP .Net 0 12-29-2005 07:44 AM
GridView: Filtr DropDownList from another DropDownList =?Utf-8?B?SnVhbmpv?= ASP .Net 0 12-23-2005 01:31 PM
databinding a Dropdownlist to another dropdownlist tshad ASP .Net 8 10-19-2005 10:00 PM
Using a data-bind dropdownlist to populate another data-bind dropdownlist mr2_93 ASP .Net 1 10-02-2005 05:07 PM



Advertisments