dropdownlist postback not firing

  • Thread starter =?iso-8859-1?B?R2VhcvNpZA==?=
  • Start date
?

=?iso-8859-1?B?R2VhcvNpZA==?=

Hi,

Wierd problem.

Using ASP.NET 2.0.

Have a DropDownList
- <asp:DropDownList ID="DropDownListMake" runat="server"
CssClass="selectComparison" AutoPostBack="True"
OnSelectedIndexChanged="DropDownListMake_SelectedIndexChanged" />

Have the corresponding codebehind event handler
- protected void DropDownListMake_SelectedIndexChanged(object sender,
EventArgs e)
{
if (!DropDownListMake.SelectedIndex.Equals("-1"))

this.ChangeMake(Int32.Parse(DropDownListMake.SelectedValue));
}

But when I select an item from the dropdownlist the page just
refreshes and no event fires.

When I debug the code on my Page_Load (C#) the if (!this.IsPostBack)
returns false i.e. it's not catching the postback. And the event for
the dropdownlist Selected Index Change isn't firing.

ViewState is enabled.

Does anyonw have any ideas??
 

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

Top