0

I want a cascading dropdown list in a SharePoint visual web part.

How can i do this? Any way to use Ajax? Need an example with code.

1
  • Where is the data for the drop-down lists coming from? Commented May 31, 2014 at 5:33

1 Answer 1

0

Well you can create an Application page with WebMethods defined and than use simple jQuery Ajax to call the methods..

Please have a look at
Call WebMethod from JS in Visual web Part

$.ajax({
     type: "POST",
     url: siteUrl + "/_layouts/SolutionName/WebMethods.aspx/Recount",
     data: "{'data':'" + data + "'}",
     contentType: "application/json; charset=utf-8",
     dataType: "json",
     async: true,
     success: function (data) {
         response(data["d"]);
     },
     error: function (result) {
         //alert("Error");
     }
 });

OR

You can simply use SPServices.Cascading Dropdown

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.