Dropdownlist onselectedIndexChanged event not fires

Discussion in 'ASP .Net Web Services' started by Alexander Reichman, Oct 17, 2004.

  1. 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.
     
    Alexander Reichman, Oct 17, 2004
    #1
    1. Advertising

  2. Alexander Reichman

    prem Guest

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

    Regards,
    PREM

    "Alexander Reichman" <> wrote in message
    news:2uAcd.5978$...
    > 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.
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
     
    prem, Nov 11, 2004
    #2
    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. Alexander Reichman

    Dropdownlist onselectedIndexChanged event not fires

    Alexander Reichman, Oct 17, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    23,352
  2. Paul L
    Replies:
    1
    Views:
    7,345
  3. Replies:
    8
    Views:
    784
  4. Paul L
    Replies:
    0
    Views:
    263
    Paul L
    May 5, 2005
  5. Replies:
    3
    Views:
    1,022
Loading...

Share This Page