protected void btnSearch_Click(object sender, EventArgs e) { try { ATTEmployeeDetailSearch objSearch = new ATTEmployeeDetailSearch(); if (this.ddlOrgName.SelectedIndex > 0) { objSearch.OrgID = int.Parse(this.ddlOrgName.SelectedValue); } if (this.txtFName.Text.Trim() != "") { objSearch.FirstName = this.txtFName.Text; } if (this.txtMName.Text.Trim() != "") { objSearch.MiddleName = this.txtMName.Text; } if (this.txtSName.Text.Trim() != "") { objSearch.SurName = this.txtSName.Text; } if (this.ddlPost.SelectedIndex > 0) { objSearch.PostID = int.Parse(this.ddlPost.SelectedValue); } if (this.ddlLevel.SelectedIndex > 0) { objSearch.LevelID = int.Parse(this.ddlLevel.SelectedValue); } Session["propertyReportSearch"] = BLLEmployeeDetailSearch.PropertyReportSearchList(objSearch); List <ATTEmployeeDetailSearch> lst = (List <ATTEmployeeDetailSearch>)Session["propertyReportSearch"]; if (lst.Count > 0) { string count = ""; count = lst.Count.ToString().Replace("0", "०"); count = count.ToString().Replace("1", "१"); count = count.ToString().Replace("2", "२"); count = count.ToString().Replace("3", "३"); count = count.ToString().Replace("4", "४"); count = count.ToString().Replace("5", "५"); count = count.ToString().Replace("6", "६"); count = count.ToString().Replace("7", "७"); count = count.ToString().Replace("8", "८"); count = count.ToString().Replace("9", "९"); lblSearchResult.Text = count + " वटा रेकर्ड भेटिए ... "; this.grdEmployeeSearch.DataSource = Session["propertyReportSearch"]; this.grdEmployeeSearch.DataBind(); } else { lblSearchResult.Text = "कुनै पनि रेकर्ड भेटिएनन् ... "; this.grdEmployeeSearch.DataSource = ""; this.grdEmployeeSearch.DataBind(); this.btnGenerateRpt.Visible = false; } } catch (Exception ex) { throw(ex); } }