title: mvc 4 missing anything on these cascading dropdowns
body: <p>hello good evening everybody I am trying to get data when one of my dropdown selected index change here are my codes I couldn't get where am ı missing or doing something wrong I am very glad if you help me thank you .</p>
  
  <p>this is my script code</p>
  
  <pre><code>$("#ddOrder").change(function (e) {
              alert = "basıldı";
              var oID = $(this).val();
              $.getJSON("../Accessory/loadWorkshops", { _orderId: oID },
                     function (data) {
                         var select = $("#ddAcc");
                         select.empty();
                         select.append($('&lt;option/&gt;', {
                             value: 0,
                             text: "Aksesuar seçiniz"
                         }));
                         $.each(data, function (index, itemData) {
                             select.append($('&lt;option/&gt;', {
                                 value: itemData.Value,
                                 text: itemData.Text
                             }));
                         });
                     });
          });
  </code></pre>
  
  <p>these are my controller codes</p>
  
  <pre><code>public ActionResult addAccessoryShipment()
      {
          if (Session["_userName"] == null)
          {
              return RedirectToAction("Index", "Home");
          }
  
          HelperPartial _helper = new HelperPartial(
              ViewData,
              Session["_userName"].ToString(),
              Session["_userPermissionId"].ToString()
              );
  
          Repository&lt;Order&gt; _ro = new Repository&lt;Order&gt;();
          IEnumerable&lt;SelectListItem&gt; _orderSelectListItem = _ro.All().AsEnumerable().Select(s =&gt; new SelectListItem
          {
              Text = s.code,
              Value = s.id.ToString()
          }).OrderBy(o =&gt; o.Text);
  
          ViewData["ddOrder"] = _orderSelectListItem;
  
          Repository&lt;AccessoryList&gt; _ra = new Repository&lt;AccessoryList&gt;();
          IEnumerable&lt;SelectListItem&gt; _clothSelectListItem = _ra.All().AsEnumerable().Select(s =&gt; new SelectListItem
          {
              Text = s.name,
              Value = s.id.ToString()
          }).OrderBy(o =&gt; o.Text);
  
          ViewData["ddaList"] = _clothSelectListItem;
  
  
          return View();
      }
  
      [AcceptVerbs(HttpVerbs.Get)]
      public JsonResult loadWorkshops(string _orderId)
      {
          //IEnumerable&lt;MyCustomerProductType&gt; _myCustomerProductType = _rc.All().Select(s =&gt; new MyCustomerProductType { id = s.id, customerName = s.customer.name, productTypeName = s.productType.name });
  
          int _oId = Convert.ToInt32(_orderId);
  
          Repository&lt;OrderCloth&gt; _ra = new Repository&lt;OrderCloth&gt;();
  
          IEnumerable&lt;MyOrderCloth&gt; _clothSelectListItem = _ra.All().Where(o =&gt; o.orderId == _oId).Select(s =&gt; new MyOrderCloth
          {
              workshopName = s.workshop.name,
              workshopId = s.workshopId
          });
  
          List&lt;SelectListItem&gt; _workshopListItem = new List&lt;SelectListItem&gt;();
  
          foreach (MyOrderCloth item in _clothSelectListItem)
          {
              _workshopListItem.Add(new SelectListItem
              {
                  Text = item.workshopName,
                  Value = item.workshopId.ToString()
              });
          }
  
          //ViewData["ddwList"] = _workshopListItem;
  
          return Json(_workshopListItem, JsonRequestBehavior.AllowGet);
      }
  </code></pre>
  
  <p>and here are my view codes</p>
  
  <pre><code>  @using (Html.BeginForm("AccessoryShipmentAdd", "Accessory", FormMethod.Post))
  {
          @Html.ValidationSummary(true)
  
      &lt;div class="control-group"&gt;
          &lt;label class="control-label"&gt;Sipariş No&lt;/label&gt;
          &lt;div class="controls"&gt;
              @Html.DropDownListFor(model=&gt;model.orderId,(IEnumerable&lt;SelectListItem&gt;)ViewData["ddOrder"],"seçim yapınız",new {id="ddOrder", @class = "span6 chosen"})
          &lt;/div&gt;
          @Html.ValidationMessageFor(model =&gt; model.orderId)
      &lt;/div&gt;
  
      &lt;div class="control-group"&gt;
          &lt;label class="control-label"&gt;Atölye Seçiniz&lt;/label&gt;
          &lt;div class="controls"&gt;
              @Html.DropDownListFor(model=&gt;model.workshopId,new SelectList(Enumerable.Empty&lt;SelectListItem&gt;(),"workshopId","workshopName"),"seçim yapınız",new {@id="ddAcc" ,@class = "span6 chosen"})
          &lt;/div&gt;
          @Html.ValidationMessageFor(model =&gt; model.workshopId)
      &lt;/div&gt;
  
      &lt;div class="control-group"&gt;
          &lt;label class="control-label"&gt;Aksesuar Seçiniz&lt;/label&gt;
          &lt;div class="controls"&gt;
              @Html.DropDownListFor(model=&gt;model.accessoryListId,(IEnumerable&lt;SelectListItem&gt;)ViewData["ddaList"],"seçim yapınız",new { @class = "span6 chosen"})
          &lt;/div&gt;
          @Html.ValidationMessageFor(model =&gt; model.accessoryListId)
      &lt;/div&gt;
  </code></pre>
  
  <p>I can get datas from loadWorkshops class but it doesnt return to my dropdown. what can I do for this ? </p>