⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cipher_content.aspx.cs

📁 大家一起研究研究,全部都是开源的CSHARP代码.带数据库的
💻 CS
字号:
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;
using System.Data.OleDb;

public partial class cipher_content : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            int procuctId = Convert.ToInt32(Request.QueryString["ProductId"]);
            string sql = "select A.*,B.[ClassId],B.[ClassName] from [NcProducts] As A Left Join [NcClass] B On A.[ProductClassId]=B.[ClassId] where A.[productId]=" + procuctId;
            WebConfig.CreateCon();
            OleDbDataAdapter da = new OleDbDataAdapter(sql, WebConfig.con);
            DataSet ds = new DataSet();
            da.Fill(ds);
            DataTable dt = ds.Tables[0];
            this.Head1.Title = ds.Tables[0].Rows[0]["ProductName"].ToString() + "的详细信息--" + Application["webName"].ToString();
            Label1.Text = dt.Rows[0]["ClassName"].ToString();
            Label2.Text = dt.Rows[0]["productNumber"].ToString();
            Label3.Text = dt.Rows[0]["ProductName"].ToString();
            Label4.Text = dt.Rows[0]["ProductGG"].ToString();
            Label5.Text = dt.Rows[0]["ProductDGG"].ToString();
            Label6.Text = dt.Rows[0]["ProductZGG"].ToString();
            Label7.Text = dt.Rows[0]["ProductIntro"].ToString();
            if (dt.Rows[0]["ProductPic"] != null)
            {
                if(dt.Rows[0]["ProductPic"].ToString() != "")
                    this.Image1.ImageUrl = "upload/"+dt.Rows[0]["ProductPic"].ToString();
                else
                    this.Image1.ImageUrl = "images/no_pic.gif";
            }
            else
            {
                this.Image1.ImageUrl = "images/no_pic.gif";
            }
            Label8.Text = "<a class=\"cBlack\" href=\"Cipher_List_" + dt.Rows[0]["classId"].ToString() + ".aspx\">" + dt.Rows[0]["CLassName"].ToString() +"</a>";
            ds.Dispose();
            da.Dispose();
            WebConfig.CloseCon();
        }
    }
}

⌨️ 快捷键说明

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