protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string drugid = string.Empty; string drugName = string.Empty; string rsid = string.Empty; if (Session["drugid"] != null) { //获取right表的内容,绑定在gv上 drugid = Session["drugid"].ToString().Trim(); cpassport cp = new cpassport(); drugName = cp.GetDrugName(drugid); //把药材的名称绑定在中药名上 Ulable1.TextValue = drugName; //绑定GV DataBindText(drugid); //登陆进来之后就要保存2个参数到隐藏的字段 hid_drugid.Value = drugid; } else { Server.Transfer("../AdWeb/APassport.aspx"); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string drugid = string.Empty; string drugName = string.Empty; string rsid = string.Empty; if (Session["drugid"] != null && Session["rsid"] != null) { drugid = Session["drugid"].ToString().Trim(); rsid = Session["rsid"].ToString().Trim(); cpassport cp = new cpassport(); drugName = cp.GetDrugName(drugid); //把药材的名称绑定在中药名上 Ulable1.TextValue = drugName; //绑定GV hid_drugid.Value = drugid; hid_rsid.Value = rsid; DataBindText(drugid); // cmimage.ImageURL = string.Empty; CharText1.Enabled = false; CharText2.Enabled = false; fupPicPath.Enabled = false; btn_upload.Enabled = false; } else { Server.Transfer("../AdWeb/APassport.aspx"); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string drugid = string.Empty; string drugName = string.Empty; if (Session["drugid"] != null) { drugid = Session["drugid"].ToString(); cpassport cp = new cpassport(); drugName = cp.GetDrugName(drugid); //把药材的名称绑定在中药名上 Ulable1.TextValue = drugName; //绑定reptear hid_drugid.Value = drugid; DataBindText(drugid); } else { Response.Redirect("../AdWeb/APassport.aspx"); } }//ispostback }