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

📄 index.aspx.cs

📁 一个电子商务网源码
💻 CS
字号:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using web.Code;

namespace web
{
	/// <summary>
	/// WebForm1 的摘要说明。
	/// </summary>
	public partial class WebForm1 : System.Web.UI.Page
	{
		protected System.Web.UI.WebControls.DataGrid DataGrid1;

		protected IndexPageDAO indexPageDAO = new IndexPageDAO();
	
		protected void Page_Load(object sender, System.EventArgs e)
		{

			// 在此处放置用户代码以初始化页面
			TopNewsVO topNewsVO = new TopNewsVO();
			topNewsVO = indexPageDAO.getPrimaryNews();
			TopNewsTitle.InnerHtml = "<a href=\"TopNews/TopNews.aspx\" target=\"blank\">" + topNewsVO.Title + "</a>";
			DataList1.DataSource = indexPageDAO.getTopNewsList();
			DataList1.DataBind();
			DataList2.DataSource = indexPageDAO.getPcByNews();
			DataList2.DataBind();
			DataList3.DataSource = indexPageDAO.getPcByPrice();
			DataList3.DataBind();
			Datalist4.DataSource = indexPageDAO.getMobileByNews();
			Datalist4.DataBind();
			Datalist5.DataSource = indexPageDAO.getMobileByPrice();
			Datalist5.DataBind();
			Datalist6.DataSource = indexPageDAO.getCameraByNews();
			Datalist6.DataBind();
			Datalist7.DataSource = indexPageDAO.getCameraByPrice();
			Datalist7.DataBind();
			Datalist8.DataSource = indexPageDAO.getMP3ByNews();
			Datalist8.DataBind();
			Datalist9.DataSource = indexPageDAO.getMP3ByPrice();
			Datalist9.DataBind();
			Datalist10.DataSource = indexPageDAO.getOAByNews();
			Datalist10.DataBind();
			Datalist11.DataSource = indexPageDAO.getOAByPrice();
			Datalist11.DataBind();
		}

		#region Web 窗体设计器生成的代码
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{    

		}
		#endregion
	}
}

⌨️ 快捷键说明

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