protected void Page_Load(object sender, EventArgs e) { try { if (Session["UserName"] == null) { Response.Redirect("FrmLogin.aspx"); } DataSet ds1 = CV.GetRecord();/*this obj is referring to some class in which GetRecord method is present which return the record from database. You can write your //own class and method.*/ string s1; s1 = "<table><tr><td>"; for (int i = 0; i < ds1.Tables[0].Rows.Count; i++) { s1 += "<a class='abc' href=# style=font-family: fantasy; font-size: large; font-weight:bold; font-style: normal; color=#D50000!important;>" + ds1.Tables[0].Rows[i][0].ToString() + " </a>| "; } s1 += "<a class='abc'> Thats all For Today!!</a>" + "</td></tr></table>"; lt1.Text = s1.ToString(); if (!IsPostBack) { DT = LG.DashboardDetails(Session["BRCD"].ToString(), LG.openDay(Session["BRCD"].ToString()), "DASH"); if (DT != null) { lblLoans.Text = Convert.ToDouble(DT.Rows[0]["LOANS"].ToString() == "" ? "0" : DT.Rows[0]["LOANS"]).ToString("0.00"); lblDeposite.Text = Convert.ToDouble(DT.Rows[0]["DEPOSITS"].ToString() == "" ? "0" : DT.Rows[0]["DEPOSITS"]).ToString("0.00"); lblShares.Text = Convert.ToDouble(DT.Rows[0]["SHARES"].ToString() == "" ? "0" : DT.Rows[0]["SHARES"]).ToString("0.00"); lblCASADep.Text = Convert.ToDouble(DT.Rows[0]["CSDEPOSITS"].ToString() == "" ? "0" : DT.Rows[0]["CSDEPOSITS"]).ToString("0.00"); lblCdRatio.Text = Convert.ToDouble(DT.Rows[0]["CDRATIO"].ToString() == "" ? "0" : DT.Rows[0]["CDRATIO"]).ToString("0.00"); lblInv.Text = Convert.ToDouble(DT.Rows[0]["Investment"].ToString() == "" ? "0" : DT.Rows[0]["Investment"]).ToString("0.00"); lblRef.Text = Convert.ToDouble(DT.Rows[0]["REF"].ToString() == "" ? "0" : DT.Rows[0]["REF"]).ToString("0.00"); lblDDS.Text = Convert.ToDouble(DT.Rows[0]["PIGMY"].ToString() == "" ? "0" : DT.Rows[0]["PIGMY"]).ToString("0.00"); lblABRRatio.Text = Convert.ToDouble(DT.Rows[0]["ABR"].ToString() == "" ? "0" : DT.Rows[0]["ABR"]).ToString("0.00"); lblALRRatio.Text = Convert.ToDouble(DT.Rows[0]["ALR"].ToString() == "" ? "0" : DT.Rows[0]["ALR"]).ToString("0.00"); LblDeptotal.Text = Convert.ToDouble(Convert.ToDouble(lblDeposite.Text) + Convert.ToDouble(lblCASADep.Text) + Convert.ToDouble(lblDDS.Text)).ToString(); } else { lblLoans.Text = "0.00"; lblDeposite.Text = "0.00"; lblShares.Text = "0.00"; lblCASADep.Text = "0.00"; lblCdRatio.Text = "0.00"; lblABRRatio.Text = "0.00"; lblALRRatio.Text = "0.00"; lblInv.Text = "0.00"; lblRef.Text = "0.00"; lblDDS.Text = "0.00"; LblDeptotal.Text = "0.00"; } Div_AccDisplay.Visible = false; divDetails.Visible = false; if (Request.QueryString["Flag"] != null) { ViewState["Flag"] = Request.QueryString["Flag"].ToString(); BindGrid(); } TxtLoginId.Text = Session["LOGINCODE"].ToString(); TxtName.Text = Session["UserName"].ToString(); string PARAM = QD.GETPARAM(); if (PARAM == "Y") { IssueNumber(); } MobileNumber(); BD.BindModuleRQ(ddlModuleRQ); //TxtFDate.Value = Session["EntryDate"].ToString(); //TxtTDate.Value = Session["EntryDate"].ToString(); //BindPending(); //BindSolved(); } } catch (Exception Ex) { ExceptionLogging.SendErrorToText(Ex); } }