title: how to display particular value when enter the building name and click view button
body: <p>I have using Kendo UI dropdownlist and one kendo masked textbox and one view button in kendo,i want to load all country in dropdownlist and select particular country corresponding given building name in textbox and click view button pls help</p>
  
  <p>I am using mvc4 razor in view page design the kendo dropdownlist    </p>
  
  <p>my view page code is:</p>
  
  <pre><code>$(document).ready(function(){
      $("#viewbutton").click(function(){
         $.ajax({
         type:'post',
         data:{name:Buildingname},
         url:'@url.Action("GetCountry");
         success:function(data)
         {
            //response particular country name and value  also all country name
           //next what will i do 
           //how to select corresponding country name
         }
      });
  });
  </code></pre>
  
  <p>My controller code is:</p>
  
  <pre><code>public JsonResult GetCountry(string name = null)
  { 
      dataTable dt;
      if(name == null)
      {
         dt = bal.country();
         for(int i = 0; i &lt; dt.Rows.Count; i++)
         {
             ListName.Add(new SelectListItem
             {
                 Value = dt.Rows[i]["CountryId"].Tostring(),
                 Text = dt.Rows[i]["CountryName"].Tostring()
             });
         }
         return Json(new SelectList(ListName, "Value", "Text"), JsonRequestBehavior.AllowGet);
     }
     else
     {
         dt = bal.country(name);
         ListName.Add(new SelectListItem
         {
            Value = dt.Rows[i]["CountryId"].Tostring(),
            Text = dt.Rows[i]["CountryName"].Tostring()
         });
         return Json(new SelectList(ListName," Value", "Text"), JsonRequestBehavior.AllowGet); 
     }
  }
  </code></pre>