Click here to Skip to main content
14,739,787 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<asp:UpdatePanel ID="UpdatePanelMain" runat="server" UpdateMode="Always"  >
  <asp:DropDownList ID="DrpEmployeeType"  CssClass="DropDownSlide"  runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlEmployeeAccessChange" >
                                <asp:ListItem>Choose one</asp:ListItem>

the probelm is that when i put CssClass DropDownSlide on DropDownList SelectedindexChanged is not working. Note DropDownSlid is A jquery.
Thanks in Advance.
Updated 25-Apr-20 22:13pm

Add Trigger To Your Update Panel


 <asp:updatepanel id="UpdatePanelMain" runat="server" updatemode="Always">
  <asp:dropdownlist id="DrpEmployeeType" cssclass="DropDownSlide" runat="server" autopostback="true" onselectedindexchanged="ddlEmployeeAccessChange">
                                <asp:listitem>Choose one</asp:listitem>
                                <asp:asyncpostbacktrigger controlid="DrpEmployeeType" eventname="SelectedIndexChanged" />
Jawad Ahmed Tanoli 22-Nov-13 8:38am
No it is not working i already do this it work fine without applying jquery.
__doPostBack('<%# DrpEmployeeType.ClientID %>', '')
By adding this code in jquery it now allow postback.
Member 12456028 13-Jun-17 1:26am
Thank you Mr.Jawad
Can you please tell me where i add this code?
PS Solutions 13-Jun-17 19:05pm
check my solution at the bottom of this page.
PS Solutions 13-Jun-17 18:36pm
This code is constantly running postBack.
Alright I found the perfect solution. Please study this code and get back to me if you have any questions

<div class="form-group">
                    <label>Scan to Email</label>
                        <div class="checkbox">
                                <asp:RadioButtonList ID="p8_radioScanToEmail" runat="server" EnableViewState="true" 
                                OnSelectedIndexChanged="p8_radioScanToEmail_SelectedIndexChanged" AutoPostBack="true">
                                <asp:ListItem Value="0" Text="No"></asp:ListItem>
                                <asp:ListItem Value="1" Text="Yes"></asp:ListItem>
                        <script>                            _doPostBack('<%# p8_radioScanToEmail.ClientID %>', '')</script>
                        <asp:UpdatePanel ID="UpdatePanelp8_stf" UpdateMode="Conditional" runat="server">
                                <asp:Label ID="p8_lblSelectedSMTPName" Visible="False" runat="server" Text="No Profile Selected Yet. Click button below to select one"></asp:Label><br />
                                <asp:Label ID="p8_lblSelectedSMTP" Visible="false" runat="server"></asp:Label>
                                <asp:Button ID="p8_btnSMTPServerSettings" Enabled="false"  
                            OnClick="p8_btnShowSMTPServerSettings_Click" CssClass="btn bg-green" runat="server" 
                            Text="SMTP Server Settings"></asp:Button>
                                <asp:AsyncPostBackTrigger ControlID="p8_radioScanToEmail" EventName="SelectedIndexChanged" />
CHill60 13-Jun-17 19:00pm
I doubt they are going to come back to you 3 years after posting the question. ...that they already accepted an answer to
PS Solutions 13-Jun-17 19:03pm
hehe I agree but that answer was partially correct u know, if you use double underscore( I mean copy and paste), then your page/panel whatever will be keep refreshing for infinity.
Add the following properties to the updatePanel tag:
and UpdateMode="Conditional".

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900