public string StateWiseZipCode(string StateID, string CityID) { try { BllZipCodeRegistration objPurchasecategory = new BllZipCodeRegistration(); string res = objPurchasecategory.StateWiseZipCode(StateID, CityID, Session["associate"].ToString()); return(res); } catch { return(""); } }
private void BindStateWiseZipCode() { DataSet dsresult = new DataSet(); XmlDocument doc = new XmlDocument(); BllZipCodeRegistration objPurchasecategory = new BllZipCodeRegistration(); doc.LoadXml(objPurchasecategory.StateWiseZipCode(cardState.SelectedItem.ToString(), cardCity.Text, Session["associate"].ToString())); XmlElement exelement = doc.DocumentElement; if (exelement.IsEmpty == false) { XmlNodeReader nodereader = new XmlNodeReader(exelement); dsresult.ReadXml(nodereader, XmlReadMode.Auto); cardzipcode.DataSource = dsresult; cardzipcode.DataTextField = "zipcode"; cardzipcode.DataValueField = "zipcode"; cardzipcode.DataBind(); } }