471,075 Members | 986 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,075 software developers and data experts.

SelectedIndexChanged event doesn't fire for Listbox or DropdownList

CW
Yes, Autopostback is true, and it doesn't make an iota of difference at all.

HTML snippet and code (behind) snippet is as below:

<asp:dropdownlist id="ddlLoginType" runat="server" Width="163px"
AutoPostBack="True"></asp:dropdownlist>

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If Not Me.Page.IsPostBack Then
Me.ddlLoginType.Items.Add("Customers")
Me.ddlLoginType.Items.Add("Sales Rep")
Me.ddlLoginType.Items.Add("Admin")

End If
End Sub

Private Sub ddlLoginType_SelectedIndexChanged(ByVal sender As Object, ByVal
e As System.EventArgs) Handles ddlLoginType.SelectedIndexChanged

....

End sub

I have changed the DDL to a Listbox and the same problem.
SelectedIndexChanged event never ever fires!

Any idea?

Nov 18 '05 #1
4 2393
Is enableViewState set to true for the Page?

Chris Taylor
http://dotnetjunkies.com/weblog/chris.taylor

"CW" <a> wrote in message news:#u**************@TK2MSFTNGP09.phx.gbl...
Yes, Autopostback is true, and it doesn't make an iota of difference at all.
HTML snippet and code (behind) snippet is as below:

<asp:dropdownlist id="ddlLoginType" runat="server" Width="163px"
AutoPostBack="True"></asp:dropdownlist>

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If Not Me.Page.IsPostBack Then
Me.ddlLoginType.Items.Add("Customers")
Me.ddlLoginType.Items.Add("Sales Rep")
Me.ddlLoginType.Items.Add("Admin")

End If
End Sub

Private Sub ddlLoginType_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlLoginType.SelectedIndexChanged

...

End sub

I have changed the DDL to a Listbox and the same problem.
SelectedIndexChanged event never ever fires!

Any idea?

Nov 18 '05 #2
CW
I originally had the <form id="form1" runat="server"> and its associated
<form/> tag around the outside the body tag.

Once I place them inside the body tag, everything seemed to work.

"CW" <a> wrote in message news:#u**************@TK2MSFTNGP09.phx.gbl...
Yes, Autopostback is true, and it doesn't make an iota of difference at all.
HTML snippet and code (behind) snippet is as below:

<asp:dropdownlist id="ddlLoginType" runat="server" Width="163px"
AutoPostBack="True"></asp:dropdownlist>

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If Not Me.Page.IsPostBack Then
Me.ddlLoginType.Items.Add("Customers")
Me.ddlLoginType.Items.Add("Sales Rep")
Me.ddlLoginType.Items.Add("Admin")

End If
End Sub

Private Sub ddlLoginType_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlLoginType.SelectedIndexChanged

...

End sub

I have changed the DDL to a Listbox and the same problem.
SelectedIndexChanged event never ever fires!

Any idea?

Nov 18 '05 #3
Is enableViewState set to true for the Page?

Chris Taylor
http://dotnetjunkies.com/weblog/chris.taylor

"CW" <a> wrote in message news:#u**************@TK2MSFTNGP09.phx.gbl...
Yes, Autopostback is true, and it doesn't make an iota of difference at all.
HTML snippet and code (behind) snippet is as below:

<asp:dropdownlist id="ddlLoginType" runat="server" Width="163px"
AutoPostBack="True"></asp:dropdownlist>

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If Not Me.Page.IsPostBack Then
Me.ddlLoginType.Items.Add("Customers")
Me.ddlLoginType.Items.Add("Sales Rep")
Me.ddlLoginType.Items.Add("Admin")

End If
End Sub

Private Sub ddlLoginType_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlLoginType.SelectedIndexChanged

...

End sub

I have changed the DDL to a Listbox and the same problem.
SelectedIndexChanged event never ever fires!

Any idea?

Nov 18 '05 #4
CW
I originally had the <form id="form1" runat="server"> and its associated
<form/> tag around the outside the body tag.

Once I place them inside the body tag, everything seemed to work.

"CW" <a> wrote in message news:#u**************@TK2MSFTNGP09.phx.gbl...
Yes, Autopostback is true, and it doesn't make an iota of difference at all.
HTML snippet and code (behind) snippet is as below:

<asp:dropdownlist id="ddlLoginType" runat="server" Width="163px"
AutoPostBack="True"></asp:dropdownlist>

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If Not Me.Page.IsPostBack Then
Me.ddlLoginType.Items.Add("Customers")
Me.ddlLoginType.Items.Add("Sales Rep")
Me.ddlLoginType.Items.Add("Admin")

End If
End Sub

Private Sub ddlLoginType_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlLoginType.SelectedIndexChanged

...

End sub

I have changed the DDL to a Listbox and the same problem.
SelectedIndexChanged event never ever fires!

Any idea?

Nov 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by leo001 | last post: by

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.