public void GetClientInfo() { try { BLAddInvoice blAddCl = new BLAddInvoice(); string ClNm = drpdwnClientNm.SelectedItem.Text; if (drpdwnClientNm.SelectedItem.Text != "--Select--") { SqlDataReader dr = blAddCl.getClientInfo(ClNm); if (dr.HasRows) { while (dr.Read()) { string add = dr.GetString(0) + "\n" + dr.GetString(1) + "\n" + dr.GetString(2) + "\n" + dr.GetString(3) + "\n" + dr.GetString(4); txtAddInvce.Text = add; txtPanNo.Text = dr.GetString(5); txtBillNo.Text = dr.GetString(6); } dr.Close(); } } Session["ClNm"] = ClNm; Session["Add"] = txtAddInvce.Text; Session["PAN"] = txtPanNo.Text; Session["BillNo"] = txtBillNo.Text; } catch (Exception ex) { lblCatchError.Text = ex.Message.ToString(); } }