protected void Page_Load(object sender, EventArgs e) { url = HttpContext.Current.Request.Url.AbsoluteUri; Session["url"] = url; if (!IsPostBack) { dml ob = new dml(); DropDownList1.DataSource = ob.getcolordetails(); DropDownList2.DataSource = ob.getmodeldetails(); DropDownList3.DataSource = ob.getpricedetails(); DropDownList1.DataTextField = "COLOR_NAME"; DropDownList2.DataTextField = "MODEL_NAME"; DropDownList3.DataTextField = "PRICE"; DropDownList1.DataValueField = "COLOR_NAME"; DropDownList2.DataValueField = "MODEL_NAME"; DropDownList3.DataValueField = "PRICE"; DropDownList1.DataBind(); DropDownList2.DataBind(); DropDownList3.DataBind(); } if (Session["username"] != null) { //Response.ClearHeaders(); //Response.AddHeader("Cache-Control", "no-cache, no-store, max-age=0, must-revalidate"); //Response.AddHeader("Pragma", "no-cache"); LinkButton12.Visible = true; LinkButton4.Visible = false; LinkButton5.Visible = false; LinkButton10.Visible = true; LinkButton8.Visible = true; Label1.Text = "Welcome" + " " + Session["username"].ToString(); } else { LinkButton12.Visible = false; LinkButton10.Visible = false; LinkButton4.Visible = true; LinkButton5.Visible = true; LinkButton8.Visible = false; Label1.Text = ""; } }