当前位置:文档之家› 在Visual Studio平台创建课表查询网站

在Visual Studio平台创建课表查询网站

实验1 基于https://www.doczj.com/doc/3c16006740.html,与Visual Studio平台创建课表查询网站

专业班级_______ 学号_________ 姓名_________ 报告日期_____

实验类型:●验证性实验○综合性实验○设计性实验

实验目的:通过实训理解创建https://www.doczj.com/doc/3c16006740.html,网站应用程序的6个基本步骤;

掌握Visual Studio集成开发环境各子窗口的使用方法,理解它们的作用;掌握Visual Studio集成开发环境中设置和更改控件属性的基本方法。

实验要求:本实验假设某学校有三个班级,要求设计一个能通过IE浏

览器进行各学生班级课表查询的https://www.doczj.com/doc/3c16006740.html,网站。

实验步骤:

1 设计分析

网站由四个独立的https://www.doczj.com/doc/3c16006740.html,网页组成(一个主网页和三个班级网页),

各个网页之间通过超链接建立联系。

主页中包含分别只想不同课程表内容飞三个HyperLink控件,各个课程

表包含有Table控制的网页构成。

2创建https://www.doczj.com/doc/3c16006740.html,网站项目

3 设计Web页面

(1)在页面中添加文字

(2)在页面中添加HTML表格

(3)在页面中添加控件

(4)在网站中添加新网页

4 设置对象属性

5 编写程序代码

(1)网站主页程序

using System;

using System.Data;

using System.Configuration;

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 _Default : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

}

}

(2)信息专业网页设计程序

<%@Page Language="C#"AutoEventWireup="true"CodeFile="信息专业.aspx.cs"Inherits="信息专业" %>

"https://www.doczj.com/doc/3c16006740.html,/TR/xhtml1/DTD/xhtml1-transitional.dtd">

无标题页



信息专业课程表

 




星期一

星期二

星期三

星期四

width: 100px; color: darkviolet; border-bottom: olive thin solid"> 第一节

计算机基础 高等代数 数据结构 高等代数 数据结构
第二节 政治

width: 100px; color: darkviolet; border-bottom: olive thin solid"> 计算机基础

第三节 数学分析 大学物理 离散数学
第四节

width: 100px; color: darkviolet; border-bottom: olive thin solid"> 网络原理

政治 数学分析



(3)数学专业网页设计程序

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数学专业 : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

}

}

(4)物理专业网页设计程序

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物理专业 : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e) {

}

}

6运行及调试程序

实验总结

通过实验大致理解了创建5 https://www.doczj.com/doc/3c16006740.html, 网站应用程序的6个基本步骤,虽然在本次网页设计过程中有很多的不足与失误,网页也是非常简单的,但对以后的网页设计学习奠定了良好的基础。

相关主题
文本预览
相关文档 最新文档