Professional Web Applications Themes

Dropdownlist onselectedIndexChanged event not fires - ASP.NET Web Services

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 ...

  1. #1

    Default Dropdownlist onselectedIndexChanged event not fires

    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_SelectedIndexCh anged" 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 Guest

  2. #2

    Default Re: Dropdownlist onselectedIndexChanged event not fires

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

    Regards,
    PREM

    "Alexander Reichman" <alexresympatico.ca> wrote in message
    news:2uAcd.5978$J16.205426news20.bellglobal.com.. .
    > 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_SelectedIndexCh anged" 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 Guest

Similar Threads

  1. Event Fires after CreateChildControls
    By John Bankhead in forum ASP.NET Building Controls
    Replies: 1
    Last Post: July 18th, 02:38 PM
  2. ItemCommand Event fires twice
    By Jonas Nilsson in forum ASP.NET General
    Replies: 3
    Last Post: August 1st, 09:19 AM
  3. asp:textbox_TextChanged event no longer fires???
    By Kathy Burke in forum ASP.NET General
    Replies: 2
    Last Post: July 18th, 02:38 PM
  4. Page Load Event Fires Twice
    By Bob Barrows in forum ASP
    Replies: 6
    Last Post: July 10th, 09:59 PM
  5. Session end event fires but it is not executing code
    By Sampriti in forum ASP.NET General
    Replies: 4
    Last Post: June 26th, 10:54 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139