DropDownList Problem

R

Roshawn

Hi,

I have a DDL server control on my web form. I'm having difficulty trying to
fire the OnSelectedIndexChanged event. I've specified a procedure to handle
the event. Whenever I changed the selected index of the DDL server control,
the event doesn't fire at all. Below are the settings for the DDL server
control:

<asp:dropdownlist autopostback="true" id="Dlist" runat="server"
onselectedindexchanged="Selection_Changed" />

Here is the code for the procedure to handle the event:

Sub Selection_Changed(Byval s as Object, Byval e as EventArgs) Handles
Dlist.SelectedIndexChanged
Me.ViewState("page") = Me.Dlist.SelectedItem.Value
Call GetData()
End Sub

What I want to do is fire the event everytime there is a change in the DDL.
In other words, I'd like the page to be posted back to the server
immediately when there is a selection change in the DDL. As it stands,
nothing happens when I select a new value in the DDL.

Can anyone help me with this problem?

Thanks,
Roshawn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top