Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to take selected value of dropdownlist in web method using cascading dropdownlist

How to take selected value of dropdownlist in web method using cascading dropdownlist

Scheduled Pinned Locked Moved ASP.NET
csharpquestionasp-netsysadmintutorial
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mohd imran abdul aziz
    wrote on last edited by
    #1

    Hi All, I am using C# asp.net 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(knownCategoryValues); string subgrp = null ; // if (!kv.ContainsKey("PGM_GRP_CODE") || !Int32.TryParse(kv["PGM_GRP_CODE"], out subgrp)) if (!kv.ContainsKey("PGM_GRP_CODE") ) { return null; } DsprdTableAdapters.SPGETPRODUCT_GIVENSUBTableAdapter prd = new DsprdTableAdapters.SPGETPRODUCT_GIVENSUBTableAdapter(); Dsprd.SPGETPRODUCT_GIVENSUBDataTable prdgrp = prd.GetProd(subgrp); List<CascadingDropDownNameValue> values = new List<CascadingDropDownNameValue>(); foreach (DataRow dr in prdgrp) { values.Add(new CascadingDropDownNameValue((string)dr["PM_PRD_NAME"], dr["PM_PRD_CODE"].ToString())); } return values.ToArray(); } and cascading toolkit I definded as <ajaxToolkit:CascadingDropDown ID="cddPROD" runat="server" TargetControlID="Ddlproduct" ParentControlID="Ddlsubdiv" Category="Prod" PromptText="Choose a Product...." LoadingText="Please wait ..." ServicePath="../Prod.asmx" ServiceMethod="GetProd" /> Pleases Suggest

    regards imran khan

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups