Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#3.0 ASP.NET4.0
Hi guys, i was trying to call a dropdownlist selected index change problematically without actually selecting it. I have an AJAX Accordion with 7 accordion panels. On the first accordion users are meant to enter their details, on the second accordion they have to fill out some details as well up to the 7th accordion. There is a dropdownlist control on the 3rd accordion that will populate the data entered in the 2nd accordion after the button click that is inside the second accordion panel. But after the click of the button the dropdownlist listitems does not chnage Here my code
 
 <asp:DropDownList ID="ddpPassportOwnerName" runat="server" ClientIDMode="Static" ValidationGroup="PassportDetails" AutoPostBack="true" >
 
protected void btnSaveDependentDetails_Click(object sender, EventArgs e)
{
//do some manipulations [i remove some code for brevity]
ddpPassportOwnerName.SelectedIndexChanged += new EventHandler(DoSomething);
 
}
 

protected void DoSomething(object sender, EventArgs e)
    {
        this.ddpPassportOwnerName.Items.Add(new ListItem(hiddenfiled.value));
    }
Posted 6-Mar-13 22:45pm

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

  Print Answers RSS
0 OriginalGriff 7,903
1 Sergey Alexandrovich Kryukov 7,127
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,820


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 7 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100