how to get selected the value of cascading Ajax dropdownlist extendar control after postback.

how to retain value of dropdown list after postback which is extended by ajax cascading dropdownlist extendar.

thanks in advance.



7/7/2008 5:42:30 AM 17816 articles. 1 followers. Follow

7 Replies

Similar Articles

[PageSpeed] 21


Can you further elaborate your problem? your retain value is for nxt drop down list?

how many drop down list you have?

normally what we trying to retrieve value from selected dropdown value is Label1.Text=DropdownList1.selectedValue




7/7/2008 9:57:34 AM

i have 2 Ajax dropdownlist Which is filed through web service. one filter the other.
the second dropdown has value <-All->,a,b
when i select a and click on button.
the second dropdown again select the <-All-> Option not the a which i select before postback.
i tried to use hidden field to store the selected value but it didn't help. first time the page is loaded it works but after i change some item it first dropdown then it coz probs.

hope i clearly present the information. 


7/9/2008 8:28:50 AM


please set the autopostback of your second dropdownlist to false

if it's still happen, may i see your web services code? and your page_load() function?



7/10/2008 1:24:45 AM


please set check your both dropdownlist, the enableAutopostback properties must be set to false.

if this is still happen, may i see your web services code and your page_load() function?


7/10/2008 1:27:12 AM

Hi Hideyoshi,

i got the answer from the following post ,becouse cascading dropdownlist loses it's viewstate in postback,so we need to take the value in session and access that in web service as mention in this link.


7/10/2008 9:19:33 AM


instead of using session, I'm using to stored the selected value once the button clicked.

Thanks for your sharing as well.


7/10/2008 10:01:12 AM


sorry, missing the word "hidden field"


7/10/2008 10:02:56 AM

Similar Artilces:

how to get SELECTED VALUE of parent dropdownlist to target dropdownlist using cascading
Hi All, I am using C# , asp.net2.0 , Ajax1.0 i am filling dropdownlist using cascading ajax extender. i taken help of ajax site and build a code to fill the control. my question is how do i get parent selected item value. my web service code to fill target value public CascadingDropDownNameValue[] GetProd(string knownCategoryValues , string category) {StringDictionary kv = CascadingDropDown.ParseKnownCategoryValuesString(knownCategoryValues); //string subgrp ; //int sub1; //if (!kv.ContainsKey("Prod") || !Int32.TryParse(kv["Prod"], out sub1)) //// if (...

Fail to get selected value of a DropDownlist in Ajax
Hi there, In my Ajax code, I have an employee list. If an user selects an employee,his/her info will show up on an updating form below to allow the emp info to be updated. after the updating button click, all fields(TextBox) are updated successfully, but a selected value in a dropdownlist control fail to update.Does anyone know what should I do to solve this problem? Thanks! BTW, after updating, I use the "Response.Redirect" this page to update the above employee list. If I use "Server.Transfer" it would cause a "Sys.WebForms.PageRequestManagerPars...

How do I set the selected value of child DropDownList control cascading
 Hello i use ajax with  CascadingDropDown for 2 dropdownlist, one parent and the second chield  for save this informatio in data base is ok, no problem, the question is when i load this information from database to my aspx, i can put the selected value in the dropdownlist parent was very good, but when y tried to put the select value to the chield i have the problem, the razon is that the chield dropdownlist is no load ... how i can load the chiel dropdown for clien side,,  any examples please for example in the proyect

How Select one dropdownlist value using down arrows corresponding other dropdownlist value are select
I am using two dropdownlist box.One is used for country selection. other one is used for state selection.I am using dropdown selectedindexchanged event. when i click country dropdownlist corresponding state is selected in state dropdownlist box. How select the country in country dropdownlist using down arrow keys at the same time corresponding state is select in state dropdown list.R.Karthikeyan   kartmca: How select the country in country dropdownlist using down arrow keys at the same time corresponding state is select in state dropdown list.Generally, we don't implmenet...

how to set the cascading dropdownextendar value to the value of dropdownlist control
i have a cascading drop down extendar inside gridview , a dropdownlist control , a link button. i want to set the  value of dropdownextendar to the value of dropdown when i click the link button . <EditItemTemplate> <asp:DropDownList ID="ProvinceDDL" runat="server" /><act:CascadingDropDown ID="ProvinceCDD" runat="server" TargetControlID="ProvinceDDL" Category="Province" PromptText="- Please select a Province -" LoadingText="[Loading Province...]" ServicePath="LocactionService....

Dropdownlist selected value passes first value in list no matter what value is selected. why ?
 HI . I have a dropdownlist. Databinds ok but when I must pass a value as a Selected value it always passes the first value in the list even if I select another value. I tried to set the ddl to enableviewstate false but it doesn't change anything. Any ideas ? Code below, thanksLoading the ddl:       productCategories = CatalogAdmin.Admin_Product_Categories_NotIn(productId);        for (int i = 0; i < productCategories.Rows.Count; i++)        {       &...

How to take selected value of dropdownlist in web method using cascading dropdownlist
Hi All,I am using C# 2.0 and ajax1.0.I am trying to fill dropdownlist using ajax cascading toolkit but I am not able to populate the dropdownlist.  My question is how do I take input value of parent dropdownlist in web service the fill the data that is in my senario I have subprod parent (fill on page load) and then Prod fill on subprod selection.  The web service method I used is  public CascadingDropDownNameValue[] GetProd(string knownCategoryValues, string category) { StringDictionary kv = CascadingDropDown.ParseKnownCategoryValuesString(known...

how can i Fill the controls on web page by selecting value from dropdownlist control.
  Hi,  Currentlly i am working on a web application where i require to fill the web form with the selected item in a text box. for example i have dropdown control named supplier_name, and i want to fill all the other controls values from database on the form when i select name from that supplier_name box,i.e , if i select name1, then related to that name, its code,address ,city should appear on related text boxes. I have done the same in windows application with c# , but the problem with web application( is that, when i select Supplier _ it...

FileUpload control value gets clear when another control uses Ajax to retrieve data
Hello all, I have a web form.  There is a DropDownList control inside an update panel and the content is updated when a RadioButtonList control fires SelecteIndexChanged.  I also have another control, a FileUpload control.  If you select a file for the file upload control and then change the value RadionButtonList list control, the selected file in the FileUpload control disappears.How do I prevent RadioButtonList from clearing the value of the FileUpload control?Any help will greatly appreciated,  TIA,Dawa Below is the code: 1 <asp:RadioButtonList ID=&quo...

Getting DropDownlist's DataTextValue Selected Value Given the SelectedValue and/or Selected Item
In the codebehind, I need to extract something from the Text (displayed) value of dropdownlist's selected item and I have  the SelectedValuand and SelectedItem in hand. How can I do this?  FindControl? Item? row?   Thanks. Well, its easier than you might think. SelectedItem has a "text" property. Thats the selected text right there :)  If you need the Text of the selection, then you have to use the SelectedItem.Text property.  If you want the value (not the displayed text) the you can directly use the SelectedValue. dim sText as String = dropdown...

Cascading Dropdownlist Extender Control, SQL Server 2000, AJAX Calendar Extender Control
1. Cascading Dropdownlist Extender Control:Hi Guys, I started implementing AJAX Controls on a in-house project in my company which requires me to use the AJAX Cascading Dropdown extender control. The issue I'm have here is, my main datasource is from sql server 2000. How do I query my datasource as well as linking the web services back to the main aspx file? I pray that someone will have the answer soon.2. AJAX Calendar Extender Control:Another issue I'm facing is that on a same form page, when I have 1 or more dropdownlists that are cascading, the autopostback effect causes my calender to f...

Getting Selected Value from DropDownList
Hi All, I'm trying to get a selected value from a dropdownlist after a submit button is pressed but keep getting the following error: Object reference not set to an instance of an object (that old chestnut!) Ok, here is the way my code is set up: I have a control called Attributes (Attributes.ascx and Attributes.ascx.vb) Attributes.ascx Here I have a dropdownlist whose id is "DataDownTest". Attributes.ascx.vb Here I have, amongst other things, this code: Protected WithEvents DropDownTest As System.Web.UI.WebControls.DropDownList Public ReadOnly Proper...

Getting The Selected Value of a DropDownList
I have a DropDownList that is populated with selections from a database on the page load event. It displays fine with all the correct values, BUT there is a problem when I try to process its data. I eventually reference the DropDownList during a button's server click event. I want to know which value is selected, and I am trying to do so with a call to: DropDownList.SelectedItem.Value; The problem is that such a call is alway referencing the first item of the list, not the one the user selects. What am I doing wrong? In your page load event handler do you put data bind code ins...

how to get the values from cascading dropdownlist
I created dropdowns at runtime.for implimentation of cascading I written webservice.Now how to get values from cascadings.when i click on save button dropdowns r created in pageload event and selected value is taking as to persist those values.thanks  try this. This SHOULD BE CONVERTED TO STRING dropdownlist1.selected value.ToString() I tried with all the properties cascadingdropdown list but not yet getthanks  Hi Bhagyam, When your DropDownList control is associated with CascadingDropDownExtender, the selected value just like you did above won't take the effe...

Web resources about - how to get selected the value of cascading Ajax dropdownlist extendar control after postback. -

Tag Synonyms - Stack Overflow
Q&A for professional and enthusiast programmers

Accidental entities - what about the UI?
This post is a follow-up to my previous blog post " Accidental entities - you don't need that identity ". In that post, we followed a consultant ...

Flash Builder Plug-in for SAP Netweaver Gateway - Adobe Labs
Search Navigation Labs Home Wiki Home Technologies Alchemy Blueprint Camera Profiles and DNG Profile Editor Cirrus ColdFusion 10 DNG Codec Fireworks ...

Air Astana - Join Now
Thank you for considering membership of Nomad Club – Kazakhstan’s first Frequent Flyer Program. You could soon be on your way to earning free ...

Languages -> C# Articles, Tutorials, Examples: ASP Alliance
.NET,ASP,ASP.NET,SQL,XML,HTML,ADO,ADO.NET,JavaScript,JScript,CSharp,VBScript and VB tutorials from AspAlliance.

Blog - Avisra
Avisra Web Development Home Blog Services Contact The Blog Latest Module Builder: How can we make it better? Sitefinity by Chris on July 2, 2013 ...

Online Booking Tool Support
This Online Booking Tool Support page might help you as you navigate through the process of booking travel through your OBT provided by CWT. ...

@Html and beyond
... ); } return string .Format( “{0}{1}” , me.Member.Name, id); } The Html building methods are quite simple. Building a dropdownlist for a ...

Top Ranked Articles
Top Ranked Articles - Free source code and tutorials for Software developers and Architects.; Updated: 23 Feb 2013

Unit Testing DateTime.Now Without Isolation
public virtual void SeedWithYearsSince(DropDownList list, int year){ for (int index = year; index

Resources last updated: 12/14/2015 1:17:55 PM