SelectedIndexChanged event does not fire

J

Jim

Hi All,



Can someone tell me why the SelectedIndexChanged event does not fire?



<form id="Form1" method="post" runat="server">

<asp:Table id="Table1" runat="server" Width="455px" Height="61px">

<asp:TableRow>

<asp:TableCell>

<asp:DropDownList id="DropDownList1" runat="server" Width="263px"
AutoPostBack="True">

<asp:ListItem Value="bef">bef</asp:ListItem>

<asp:ListItem Value="kut">kut</asp:ListItem>

</asp:DropDownList>

</asp:TableCell>

</asp:TableRow>

</asp:Table>

</form>






private void DropDownList1_SelectedIndexChanged(object sender,
System.EventArgs e)

{

Response.Write("it works!"); //no way!!



}



ch Jim
 
S

Sundararajan

Hi Jim,

I am facing the same problem in my application. can u please tell me how
to go about it ASAP

regards,
sundararajan.S
 
S

steve-o

Sundararajan said:
Hi Jim,

I am facing the same problem in my application. can u please tell me how
to go about it ASAP

regards,
sundararajan.S
*Check that the AutoPostBack Property is set to true for your dropdownlist.
*Check your InitializeComponent() method and make sure your dropdownlist
control is wired to the correct event:
this.DropDownList1.SelectedIndexChanged += new
System.EventHandler(this.DropDownList1_SelectedIndexChanged);

Hope this helps,
Steve-O
 

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,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top