protected void Page_Load(object sender, EventArgs e) { if (Session["user_name"] == null) { Panel1.Visible = false; Panel2.Visible = true; } else { ser.Uname = Session["user_name"].ToString(); if (ser.get_uid().Rows.Count > 0) { txt_user.Text = ser.get_uid().Rows[0][0].ToString(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ser.Uname = Session["user_name"].ToString(); DataTable dt = ser.get_uid(); if (dt.Rows.Count > 0) { HiddenField1.Value = dt.Rows[0][0].ToString(); } } }
protected void Page_Load(object sender, EventArgs e) { if (Session["user_name"] == null) { } else { ser.Uname = Session["user_name"].ToString(); DataTable dt = ser.get_uid(); if (dt.Rows.Count > 0) { ser.Uid = Convert.ToInt32(dt.Rows[0][0].ToString()); DataTable dt2 = ser.get_comand(); GridView1.DataSource = dt2; GridView1.DataBind(); } } }