SelectedIndexChanged event does not fire

Discussion in 'ASP .Net Web Controls' started by Jim, Mar 8, 2005.

  1. Jim

    Jim Guest

    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
     
    Jim, Mar 8, 2005
    #1
    1. Advertising

  2. Jim

    Jim Guest

    nevermind i got it
    "Jim" <> schreef in bericht
    news:...
    > 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
    >
    >
    >
     
    Jim, Mar 8, 2005
    #2
    1. Advertising

  3. Jim

    Sundararajan Guest

    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

    "Jim" wrote:

    > nevermind i got it
    > "Jim" <> schreef in bericht
    > news:...
    > > 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
    > >
    > >
    > >

    >
    >
    >
     
    Sundararajan, Mar 8, 2005
    #3
  4. Jim

    steve-o Guest

    "Sundararajan" <> wrote in message
    news:...
    > 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
     
    steve-o, Mar 8, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jim
    Replies:
    3
    Views:
    5,694
  2. Replies:
    0
    Views:
    1,674
  3. akhzar
    Replies:
    1
    Views:
    746
    akhzar
    Mar 6, 2009
  4. Brad

    Datagrid SelectedIndexChanged Does Not Fire

    Brad, Nov 25, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    133
  5. Taoge

    Dropdownlist SelectedIndexChanged does not fire?

    Taoge, Aug 21, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    105
    Taoge
    Aug 21, 2006
Loading...

Share This Page