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

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

AJAX CascadingDropDown Validation and SelectedValue

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :ASP.Net

I am currently using 3 drop down lists (with objectdatasources) to enable my users to select/filter thru Report Topics - Report Sub-Topics - Report Sub-Topic Details.  I am also currently using validation (requiredfield) to make sure that if a drop down list is enabled, a selection must be made by the user before these selections are saved into a database.

This method works for me but is somewhat slow.  While looking for a quicker method for this I came across using the AJAX CascadingDropDown extender.   This seems to be the way to go HOWEVER I can not seem to get validation to work on the second 2 drop downs.  So here are my questions:

1. Is there a "native" way to validate a CascadingDropDown?  If not, how is it done?

2. Is there a better way of getting a SelectedValue from the CascadingDropDown?  Now I get something like "23:::Selected Report Topic:::".

3. Finally - is using the CascadingDropDown extender the best tool for this task - giving the end user the ability to filter down selections and then saving them to a database?

Any insight here would be appreciated.

View Complete Post

More Related Resource Links

Ajax and Validation on Partial Views

I have a main page "Index". Index page has 2 partial views 1. "CategoryList"- list with bunch of checkboxes2. "Add Category" - 1 text field -"BlogCategoryName" with "create" buttonWhat i want to do is when someone types in a new "CategoryName" in the text field of "Add Category" partial view it would send via Ajax to AddCategory controller then it would return a new List and Update "CategoryList" on the index page.Questions:How would i achieve this? so that validation works (ie when CategoryName is blank it would return that partial view with validation) however when successfully validated it would return a new list and update the "CategoryList" partial view.What's the best approeach?would I use JSON or AJAX?thanks

how to do a ajax integrated validation in required field sharepoint newform.aspx

hi all, i have newform.aspx in sharpeoint list where in i have 2 cols which are reqd field. how would i make the server side validation without refreshing the page.. can i put it ajax update panel ?  how would i achieve this requirement.jayaraja

DropDownList with CascadingDropDown no SelectedValue...?


Hi All,

I cannot get selected value from DropDownList in my codebehind, is there any possibility to get the value?

Below is which i am trying:

<asp:DropDownList id="DDL" AutoPostBack="False" runat="server">

 <cc1:CascadingDropDown ID="ccDD"

Here is my tow behind code and both are failed to get selected value.

'            With AjaxControlToolkit.CascadingDropDown
 Protected Sub FilterData()
        Dim frm As Control = Me.FindControl("searchbox").FindControl("ctl04") 'Form1 is the HTML
        For Each ctrl As Control In frm.Controls
            If TypeOf (CType(ctrl, Control)) Is AjaxControlToolkit.CascadingDropDown Then
                Dim ddl As AjaxControlToolkit.CascadingDr

Set focus on erronous control on validation inside ajax tabcontrol having 5 tab


Hiii.. Everybody

How to set the focus on textbox when requiredfield validator error mesage comes to action inside the ajax tabcontrol.The ajax tabcontrol is having 5 tabs.The submit button is in 5th tab .I have reqiredfield validator for textbox  in 1st tab.I want to set the focus on textbox if validation fails.Is it possible to get without postback????

Is there anyone can help me out ????

Thanks in advance

Retrieve SelectedValue from CascadingDropDown lists?


I followed a tutorial yesterday to implement CascadingDropDown lists but I can't find many examples of how to retrieve their selected value.

Can this only be done using javascript?

Is there any way to access the SelectedValue of the CascadingDropDown lists in the codebehind?

I'm using them in an EditItemTemplate, in a DetailsView, on a master/details page.

Ajax Control Toolkit CascadingDropDown Control


Hello everyone,
I'm kind of new to the ASP.NET and the Ajax Control Toolkit. So please excuse me if this question is silly.

After going through the three selections in the sample CasCadingDrop Menu located at http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/CascadingDropDown/CascadingDropDown.aspx

(i.e make, model and color), how do you get the last selection (i.e color) to actually point to something (another page) rather than just show that you've selected something?

Thanks for your help!


AJAX Validation callout extenders firing when other buttons are pressed


I have several buttons on a page, but have assigned some validators and AJAX validator callout extenders to one button in particular. However, the validator callout extenders seem to be firing even if I press a different button. I thought this was the point of setting a TargetControlID (for the valiator callout extender) and a ControlToValidate for the validator itself! Any suggestions as to what I'm doing wrong?

<asp:TextBox ID="tbNewDuration" runat="server" />   Duration <br />
<asp:RequiredFieldValidator ID="tbNewDurationRFV" ControlToValidate="tbNewDuration" ErrorMessage="Please enter a Duration value." Display="None" runat="server" />
<cc1:ValidatorCalloutExtender ID="tbNewDurationVCE1" runat="server"  TargetControlID="tbNewDurationRFV" />
<asp:RegularExpressionValidator ID="tbNewDurationREV" runat="server" Display="none" ControlToValidate="tbNewDuration" ErrorMessage="Please enter a number of 10 digits" ValidationExpression="^\d{10}$" />
<cc1:ValidatorCalloutExtender ID="tbNewDurationVCE2" runat="server" TargetControlID="tbNewDurationREV" />

Validation for Ajax Combobox control


for Ajax Combobox controls validation is not working.

Please help me out with quick solution 


Thank you




Do Ajax Toolkit Extenders participate in server side validation?


If I use the extenders (for example mask edit) in place of some of the built in validators such as RegularExpressionValidator for exampe, will Page.Validate() still be called automatically and perform server side validation using the extenders?

CascadingDropDown in Ajax With ASP.net

The article CascadingDropDown in Ajax With ASP.net was added by codenickel on Saturday, October 30, 2010.

Step1: Create a table in database:-create table test(state1 varchar(50),city varchar(50))Step2:- In the .aspx Page:-select id="statelist" runat="server" onchange="showCity()" style="width: 160px"> option>

need validation in ajax


hi tuitor's


i designed  registration form i want validate that form in ajax .i am a begineer so please tell idea and code soonnnnnnnnnnnn


thanks advance

Server validation is not firing if submited by Jquery $.ajax method


I am new in MVC.Using MVC2.MY create view is given below...

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MvcApplication1.Models.ExpenseCategory>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script src="<%=ResolveUrl("~/Scripts/jquery-1.4.1.min.js")%>" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
        function SaveExpenseCategory() {
            try {

                var requrl = "/ExpenseCategory/Create";
                var formID = "frmAddEC";
                var serdata = $(frmAddEC).serialize();


Microsoft AJAX CDN

Content delivery networks (CDNs) are composed of "edge cache" servers that are strategically placed around the world at key Internet network points. These "edge cache" servers can be used to cache and deliver all types of content - including images, videos, CSS and JavaScript files.

Using a CDN can significantly improve a website's end-user performance, since it enables browsers to more quickly retrieve and download content. For example, instead of having a browser request for an image traverse all the way across the Internet to your web server to download, a CDN can instead serve the request directly from a nearby "edge cache" server that might only be a single network hop away from your customer (making it return much faster - which makes your pages load quicker).

AJAX GridView Checkbox Select All in ASP.Net

In the previous article GridView Select Multiple Rows you learnt the multiple row selection in GridView control. Here you will get the C# code sample to select all the gridview rows using single checkbox server control. You can highlight the selected rows with different color and Font state Bold. If you want to use the selection values on different ASP.Net

AJAX GridView Paging and Sorting using C# in ASP.Net

To enable the GridView Paging and Sorting to update the GridView Data without refreshing the ASP.Net web page AJAX Extension controls are used. UpdatePanel is used to hold the GridView control that triggers the events for the controls placed inside it. By Default UpdatePanel triggers the asynchronous postbacks for its child controls.

GridView Paging Using Ajax in ASP.Net

To enable the GridView Paging and Sorting to update the GridView Data without refreshing the ASP.Net web page AJAX Extension controls are used. UpdatePanel is used to hold the GridView control that triggers the events for the controls placed inside it. By Default UpdatePanel triggers the asynchronous postbacks for its child controls.

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