Web/IndexPage/ShowShop.aspx.cs

(完整代码) 1KB

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class IndexPage_ShowShop : System.Web.UI.Page
{
    Bll.ProductBll b_Pro = new Bll.ProductBll();
    public string pid;
    public string img;
    public string imgname;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
             pid = Request.QueryString["pid"];
                ViewState["pid"] = Convert.ToInt32(pid);
                DataTable da = b_Pro.SelectPro("select * from tab_products where productID=" + pid);
                img = this.Image1.ImageUrl = "..\\Images\\BigImages\\" + da.Rows[0]["productImg"].ToString();
                imgname = da.Rows[0]["productImg"].ToString();
                this.Label7.Text = da.Rows[0]["productName"].ToString();
                this.Label1.Text = da.Rows[0]["productUnitPrice"].ToString();
                this.Label2.Text = da.Rows[0]["productUnitPrice"].ToString();
                this.Label3.Text = da.Rows[0]["productCount"].ToString();
                this.Label8.Text = da.Rows[0]["productDate"].ToString().Substring(0, 10);
                this.Label4.Text = da.Rows[0]["productContent"].ToString();
        }

    }
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        //Response.Redirect(this.Image1.ImageUrl);
    }
}

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读 AI

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。