public HtmlSelect FillTaluka(string DistrictID, string Taluka, int i) { DataTable dt = new DataTable(); dt = InstituteRepository.displayTalukaWithinDistrict(DistrictID, "E"); HtmlSelect hTaluka = new HtmlSelect(); hTaluka.ID = Taluka; hTaluka.Attributes.Add("class", "selectbox"); if (i == 0) //for all drop downs except for 'OfficeIncharge' in OtherInformation { hTaluka.Attributes.Add("onblur", "setTaluka(this.value);"); } else //for drop down of 'OfficeIncharge' in OtherInformation { hTaluka.Attributes.Add("onblur", "setTalukaSec(this.value);"); } clsCommon common = new clsCommon(); common.fillDropDown(hTaluka, dt, "", "Text", "Value", "---- Select ----"); dt.Dispose(); return(hTaluka); }