Dropdownlist onselectedIndexChanged event not fires

A

Alexander Reichman

Hi All,



I have 22 years of over all experience in programming but just recently
started to learn WEB applications, and started to write my first application
in ASP.NET(VB)

using VISUAL Studio .NET 2003



I have a DropDownList on a Web Form in WEB user control.

SelectedIndexChanged event is not and it does not call
DropColors_SelectedIndexChanged subroutine. (Tested in Debug mode)



Here is an excerpt from qjobsearch.ascx (I have created this DropDownList
only for test)



<%@ Control Language="vb" AutoEventWireup="false"
Codebehind="qjobsearch.ascx.vb" Inherits="MyJobSite.qjobsearch"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5" debug="True"
enableViewState="True" warningLevel="1"%>

<tr>

<td width="100%" bgcolor="#ff9933" style="BORDER-RIGHT:

medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none;
BORDER-BOTTOM: medium none">

<p style="MARGIN-LEFT: 4px"><font
color="#ffffff"><b>Title Quick Job search</b></font></p>

</td>

</tr>

<tr>

..

..

<form id="Form2" runat="server">

<p align="left" style="MARGIN: 4px 6px"></p>

<asp:DropDownList ID="dropColors"
OnSelectedIndexChanged="dropColors_SelectedIndexChanged" Runat="Server"


Width="88px" AutoPostBack="true" >


<asp:listitem value="Red">Red</asp:listitem>


<asp:listitem value="Green">Green</asp:listitem>


<asp:listitem value="Blue">Blue</asp:listitem>

</asp:DropDownList>



..

</FORM>



I have created another form which contains only this control and it works

May be there are some restrictions to use this control in ASCX files and
under some HTML tags.

Also may be you know some methods to trace the raised events.



Any help will be much appreciated.



Thanks.



Alex.
 
P

prem

Hi Alexander,
check your Drop Down List AutoPostBack propertie.
Set DropDownList AutoPostBack Propertie to TRUE

Regards,
PREM
 

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,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top