软件学院课程设计报告书课程名称.NET框架程序设计设计题目网上购物车专业班级学号姓名指导教师月I目录1设计时间............................................................................................................12设计目的............................................................................................................13设计任务............................................................................................................14设计内容............................................................................................................14.1用户控件和主控页的设计............................................................................14.1.1创建用户控件.............................................................................................14.1.2主控页的设计.............................................................................................34.2内容页的设计................................................................................................54.2.1主页的设计.................................................................................................54.2.2商品网页的设计.........................................................................................64.2.3购物车网页的设计.....................................................................................94.2.4结账网页的设计.......................................................................................124.2.5订单网页的设计.......................................................................................164.3系统测试......................................................................................................174.3.1用户控件图...............................................................................................174.3.2主控页图...................................................................................................174.3.3主页的运行图...........................................................................................184.3.4商品网页的运行图...................................................................................194.3.5购物车网页的运行图...............................................................................194.3.6结账网页的运行图...................................................................................204.3.7订单网页的运行图...................................................................................205总结与展望.....................................................................................................21参考文献.............................................................................................................22-1-1设计时间2设计目的此次的.net框架课程设计是对所学网页设计课程的一个阶段性的锻炼,是提高我们对所学知识综合应用能力的一种方式,是集中实践性环节之一。要求我们对理论课中所学习到的知识综合运用,实现有一定规模的.net框架的开发和应用。.net框架课程设计是计算机相关专业的必修专业基础课程,其实践性、应用性很强。实践环节对我们来说是必不可少的一个重要环节。我们可以通过本次课程设计更好的练习并掌握所学知识,在实际的应用中掌握所学知识,让我们能过更好的理解课堂所学知识,并将它融入到所能涉及到的日常生活中,从而更好地掌握它,更好的在以后的工作中熟练运用。3设计任务完成对网上购物车系统设计,并写出规范的设计文档。本系统是一个网上食品商店的小型网站,几个核心问题包括:主页面的设计;商品的分类显示;选购和调整购物车;集中结算;存储订单;查看订单。将此些功能完好的结合在一起。4设计内容4.1用户控件和主控页的设计4.1.1创建用户控件用户控件源代码:%@ControlLanguage=C#AutoEventWireup=trueCodeFile=WebUserControl.ascx.csInherits=WebUserControl%divstyle=text-align:centertablestyle=width:20cm;height:3cmtrtdalign=centerrowspan=3style=width:7cm;height:3cmasp:ImageID=Image1runat=serverImageUrl=~/image/r1.jpg//tdtdstyle=width:13cm;height:1cmmarquee欢迎来到网络食品店/marquee/td/tr-2-trtdalign=centerstyle=width:13cm;height:1cmasp:LabelID=Label1runat=serverText=美食在线/asp:Label asp:HyperLinkID=HyperLink1runat=serverNavigateUrl=~/主页.aspx主页/asp:HyperLink asp:HyperLinkID=HyperLink2runat=serverNavigateUrl=~/购物车.aspx购物车/asp:HyperLink asp:HyperLinkID=HyperLink3runat=serverNavigateUrl=~/结账.aspx结账/asp:HyperLink asp:HyperLinkID=HyperLink4runat=serverNavigateUrl=~/订单.aspx订单/asp:HyperLink asp:ButtonID=Button1runat=serverText=查询/:asp:TextBoxID=TextBox1runat=serverWidth=49px/asp:TextBox/td/trtrtdalign=centerstyle=width:13cm;height:1cmasp:LabelID=Label2runat=server/asp:Label/td/tr/table/div用户控件后台文件:usingSystem;usingSystem.Data;usingSystem.Configuration;usingSystem.Collections;usingSystem.Web;usingSystem.Web.Security;-3-usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingSystem.Web.UI.WebControls.WebParts;usingSystem.Web.UI.HtmlControls;publicpartialclassWebUserControl:System.Web.UI.UserControl{protectedvoidPage_Load(objectsender,EventArgse){DateTimed=DateTime.Now;Label2.Text=d.ToLongDateString()+d.ToLongTimeString();}}4.1.2主控页的设计主控页源代码:%@MasterLanguage=C#AutoEventWireup=trueCodeFile=MasterPage.master.csInherits=MasterPage%%@RegisterSrc=WebUserControl.ascxTagName=WebUserControlTagPrefix=uc1%!DOCTYPEhtmlPUBLIC-//W3C//DTDXHTML1.0Transitional//EN==servertitle无标题页/title/headbodyformid=form1runat=serverdiv-4- br/divstyle=text-align:centertablestyle=width:20cm;height:15cm;background-image:url(image/h.jpg);trtdcolspan=2style=width:20cm;height:3cm uc1:WebUserControlID=WebUserControl1ru