protected void Page_Load(object sender, EventArgs e) { if (Session["UserAccount"] == null) { Response.Redirect("../login.aspx"); } //这里我改了,时间2016.12.17.22.05 //else if (Session["UserAccount"].Equals(Request.QueryString["account"])==false) //{ // Response.Redirect("../login.aspx"); //} if (!IsPostBack) { product_Entity product = new product_Entity(); product = dt.inquireProById(Session["UserAccount"].ToString(), int.Parse(Request.QueryString["id"])); txtProduct_name.Text = product.P_name; txtProduct_number.Text = product.P_cNum.ToString(); txtProduct_price.Text = product.P_price.ToString(); txtProduct_category.Text = product.P_category; Image1.ImageUrl = product.P_photo; } }
public product_Entity inquireProById(string account, int ProId) { return(db.inquireProById(account, ProId)); }