473,322 Members | 1,522 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 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 2504
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Paul Lacey | last post by:
When dynamically placing dropdownlists inside a panel, the dropdownlist's SelectedIndexChanged event doesn't fire. If you take the dropdownlist out of the panel it works properly. Autopostback is...
1
by: Edward | last post by:
I am having a terrible time getting anything useful out of a listbox on my web form. I am populating it with the results from Postcode lookup software, and it is showing the results fine. What...
2
by: CW | last post by:
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"...
7
by: Daniel | last post by:
Is there any other way can override this event, like javascript onchange added to the attribute of this dropdownlist? Thanks
0
by: Tand35006 | last post by:
Hi, I hope some one can help with this. I have a basic webform with 2 DropDownLists and a single DataGrid. What I am trying to do is populate the first DDList from a dataset on Form_Load. I then...
3
by: Alec MacLean | last post by:
Hi, I have a couple of win forms where I am editing values that are stored in a SQL database. I'm using the listbox control to hold the data object each form interacts with. Each object is...
2
by: jnoody | last post by:
The problem I am having is with the SelectedIndexChanged event not always firing or the SelectedIndex property not being correct when the event does fire. The code is below, but here are some...
3
by: martin1 | last post by:
Hi, All, I want user select first item (called All) in listbox, then all other items are selected by SetSelected method, but in loop (see code below) whenever going to SetSelected(), the...
11
by: J055 | last post by:
Hi I have a dropdown control which is constructed in another dropdown control SelectedIndexChanged event protected void ddlParamType_SelectedIndexChanged(object sender, EventArgs e) { //...
7
by: Damien | last post by:
Hi guys, I'm trying to learn ASP.NET and got a problem with DroDownList... SelectedIndexChanged doesn't fire. Maybe you'll be able to suggest something. I think it may be connected with the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.