.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Cascading dropdowns without JavaScipt/jQuery

Posted By:      Posted Date: September 25, 2010    Points: 0   Category :ASP.Net

I have 2 dropdown's in my form in a view.  (Countries and regions)

Obviously I need the regions dropdown to change it's content whenever the countries list have been change.

However, I do NOT want to do this with any dependancy on JavaScript.

Did not do webforms for years, but remember one let the dropdown postback the form.  I dont think it work like this in MVC, as posting my form will force validation to kick in to easy, and the user see a lot of "error messages" just because they are selecting their country and region?

Any advice / tips / links?

View Complete Post

More Related Resource Links

IP2003 cascading dropdowns w/SP2007

I'm new to IP.  My client base is IP2003 only on SP2007.  The forms have repeating data sections so web form is out of the question as I understand it. :(  

The forms are run on the clients local version off IP.  I would like to use a SharePoint list as the basis for some cascading drop downs.  Is that a realistic idea in IP as described? 

Displaying IDs in cascading dropdowns

Hi, I am using sharepoint RTM on windows server 2008 sp2, i have implemented Cascading dropdown scenario by reading the following blog: http://msdnvietnam.net/blogs/quang/archive/2010/03/30/cascading-drop-down-list-in-sharepoint-2010-using-infopath-2010.aspx I am having a problem that if i select the City Dropdown for the first time, then it works fine and cascading works fine but if i reselect (or select another city) then the value selected in District dropdown loads the respective items but the previous selection Id is also displayed. e.g, I select City1 from City DropDown, District dropdown shows District1 Name(ID = 1) and District2 Name (ID = 2) Then I select District2 Name then I select City2 from City DropDown, District dropdown shows "2" (District2 ID) and District3 Name and so on. Can anybody help me with this....

Creating cascading dropdowns - Unable to add filter

Hi all ! I'm trying to learn about how to create cascading dropdowns.In fact I found good explainations, but something very weird is happening... When I click on the filter (using external datasource) a message like 'There is no support atr the web form of infopatrh 2007 for filter' (or something like this).Then the buttons to add, modify, etc appear disabled to me. Any hint, felas ?

infopath 2007 cascading dropdowns



Can anyone suggest me the Infopath cascading dropdowns. I need to create one form ...it will have 3 dropdown and based on the users selection in the first dropdown 2nd dropdown should display only one item (out of 3 standard items..users dhould see only one item int he dropdown). based on the user's selection wrd dropdown should show 2 items (out of 5 standard items....users should see some items only based ont he first dropdwons selected value). Can anyone one suggest how to accomplish this?. Thanks in advance to all.

I have loaded a cascading drop down list using Jquery. However my selection does not update the unde


I have 2 dropdownlists, the second (department) cascades from the first (division). I use a jquery script to update the second drop down list. When the user clicks submit, the underlying model is updated, apart from the new value for department. 2 ideas I have for fixing this are; a) Generate a postback. Prefer not to do this because of bad user experience. b) With a JQuery change event, make a call to server side and set a ViewData variable that I can use to update the field in the model later.

However there must be a better way. This is the view;

Cascading Dropdowns Reload on Event Trigger



I have three cascading dropdowns and two of them need to trigger something outside of the dropdowns, so I have OnSelectedIndexChanged events on them.  So as to not reload the whole page when these items are triggered, I have all of this in an Update Panel.

Everything works fine -- the only issue that the client doesn't like is that the cascading dropdowns reload on the asynchronous postback.  Can you think of any way to avoid this?


Still issue with Cascading Dropdowns


I have looked at the post on http://www.dotnetcurry.com/ShowArticle.aspx?ID=221 and got this to work somewhat.  I have 2 fields just like the example.   One is Location and the other is Lab.  I can have multiple locations, and within the locations, multiple labs for each location.  So when I select a Location, I want to show all labs for that location.  This part works.  But when I click Update, I the Lab value is not getting written back to the database.  I suspect it is because I dont have a SelectedValue='<%# BIND' but when I add one, I get an error.  Also, in the example post above, he does not have one either. 

The code for the Lab field is below.  What am I doing wrong.  This cant be that difficult. 



<asp:TemplateField HeaderText="Lab" SortExpression="LAB">
                            <asp:DropDownList ID="gvLABS_DROPDOWN" runat="server" DataSourceID="SqlDataSource8"  

Cascading dropdown using jquery



Hey guys,


i need to create a 4-step cascading dropdown but NOT in the editform.aspx. I used the tutorial with the surcecode below and it worked perfectly but doesn't fit my needs.



<script language="javascript" type="text/javascript" src="../../jQuery%20Libraries/jquery-1.4.2.js"></script>
<script language="javascript" type="text/javascript" src="../../jQuery%20Libraries/jquery.SPServices-0.5.7.min.js"></script>
<script language="javascript" type="text/javascript">
	$(document).ready(function() {
			relationshipList: "Regions",
			relationshipListParentColumn: "Country",
			relationshipListChildColumn: "Title",
			parentColumn: &qu

Add rows dynamically to a table and poulate data in cascading dropdowns

hi,I am using ASP.NET3.5,
I want to Add rows dynamically to a table.I am using masterpage in my .aspx pages.
I have written the following code code.This code is working fine.
but I need to load data in dropdownlist2 dynamically based on another dropdownlist1.and i need to do few calculations based on table data.
but how can I do using  javascript/jquery/Ajax ??
can i do all my calculations using these html controls?

1  dynamically Add rows to table.(which doesnt give burden to server)
2  need to use cascading dropdowns (like Country,States,villages )
3  Have to do some calculations (like Tax calculations based on table data)
4  Have to enable/disable few controls base on input data of dropdowns and textboxes.

    <TITLE> Add/Remove dynamic rows in HTML table </TITLE>
    <SCRIPT language

Cascading Dropdowns with Dynamic Data


Hi there,

 I need to disable a dropdown depending on the selected value of another dropdown in my detailsview in edit mode.

 I had previoulsy created a file enumeration_edit.ascx so that I would be able to bind a list of names to this dropdown but now that we have a new type of user I want to disable this dropdown when a different user type is selected.

I was thinking of adding a simple 'if' statment when binding the list to the dropdown but I'm not sure how to get the other dropdown's selected value from inside enumeration_edit.ascx.


Appreciate some feedback.

cascading dropdowns


Hi - is there a way to do cascading dropdown lists with dynamic data when editing?  For example, a "City" dropdown would be populated based on the drop down selection in the "State" dropdown. 



ASP.NET: AJAX Cascading Dropdownlist with Autosuggest using Jquery

This article explains with an example on how to implement cascading dropdownlist using jquery and apply autocomplete feature using Select2 jquery plugin in the client side.

GridView Confirmation Box Using JQuery BlockUI in asp.net

JQuery is the most popular JavaScript library. One of the main reasons for its fame is the plugin architecture. Anyone can create a separate library that leverage the JQuery library. In this article we are going to look at the BlockUI library which is used to block the user screen while performing a task.

jQuery $(document).ready() and ASP.NET Ajax asynchronous postback

Many call it the ASP.NET jQuery postback problem, but using the technique below should make it no problem anymore. $(document).ready() isn't called after an asynchronous postback. What this means? You lose the functionality that should be executed within $(document).ready() after an UpdatePanel rendered its contents after an asynchronous postback.

call JavaScript - jQuery code from ASP.NET Server-Side

jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side.

Making Ajax Callbacks to the Server Using jQuery with ASP.NET

In the first part of this article series I introduced jQuery's functionality and how it provides a rich client side programming model. This time around I'll expand on these concepts and show you how you can use jQuery in combination with ASP.NET using it as an AJAX backend to retrieve data. I'll also discuss how you can create ASP.NET controls and otherwise interact with jQuery content from ASP.NET pages in WebForms.

jQuery is just a JavaScript library so it will work seamlessly with ASP.NET both from page code as well as through backend driven code using the Page.ClientScript object or ScriptManager. You can use jQuery on its own as a client side and Ajax library that communicates with ASP.NET or you can use jQuery in combination with ASP.NET AJAX. The two actually complement each other quite well as jQuery provides functionality that the ASP.NET AJAX library does not and vice versa. For the most part the interaction between the two libraries is trouble free except for a few very rare edge cases.

Displaying Row Details Tooltip on GridView using JQuery

Continuing exploring JQuery! I decided to implement a feature to display some kind of details related to a row displayed on GridView. For example when displaying employees details on GridView some information might not fit in the GridView because it will make it huge and wide. These infomration can be diplayed as Tooltip. Or when you want to display a picture and some kind of formated text to be diplayed as tooltip when mouse hover on the image.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend