show.aspx.cs

来自「网开商城系统网开商城系统网开商城系统网开商城系统」· CS 代码 · 共 45 行

CS
45
字号
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 show : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        binder();
    }
    public void binder()
    {
        int id = Convert.ToInt32(Request.QueryString["id"].ToString());
        if (Request.QueryString["id"] == "")
        {
            Response.Redirect("Index.aspx");
        }
        
        Product dt = Product.GetUserByUserId(id);
        this.Proname.Text = dt.Proname;
        this.fileimages.ImageUrl = dt.Pic.ToString();
        this.BigClass.Text = dt.BigClass;
        this.MemberPrice.Text = dt.MemberPrice;
        this.MarketPrice.Text = dt.MarketPrice;
        this.cha.Text = dt.Cha;
        this.Content.Text = dt.Content;
        
    }
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        Session["id"] = Request.QueryString["id"].ToString();//商品编号
        Session["Proname"] = this.Proname.Text;//商品名称
        Session["MemberPrice"] = this.MemberPrice.Text;//商品单价
        Response.Redirect("buy.aspx");

    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?