《基于WEB程序设计》期末考试及答案.doc_第1页
《基于WEB程序设计》期末考试及答案.doc_第2页
《基于WEB程序设计》期末考试及答案.doc_第3页
《基于WEB程序设计》期末考试及答案.doc_第4页
《基于WEB程序设计》期末考试及答案.doc_第5页
已阅读5页,还剩3页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

学习中心: 姓名: 专业: 学号: 座位号: 密封线 基于WEB程序设计期末考试试卷 考生注意:1本试卷共有六道大题,满分100分。2考试时间90分钟。3卷面整洁,字迹工整。4填写内容不得超出密封线。总分题号一二三四五六核分人题分101020103020复查人得分得分评卷人一、HTML代码分析(每小题5分,共10分) 1. 根据网页截图效果补充代码。(5分) _1_ 2. 根据网页截图效果补充代码。(5分) row 1, cell 1 row 1, cell 2 row 2, cell 1 row 2, cell 2 得分评卷人二、数据库基础代码分析 (每小题5分,共10分)1.解释代码:请解释下述代码的含义。(5分)INSERT INTO article ( title, writer, content )VALUES (实验, 学生, 插入数据);2.解释代码:请解释下述代码的含义。(5分)DELETE *FROM articleWHERE 编号=1;得分评卷人三、标准控件代码分析(每小题10分,共20分)1. 解释代码:请解释下述代码的含义。(10分)ButtonEx.aspx : 无标题页 -ButtonEx.vb :Partial Class _Default Inherits System.Web.UI.Page Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Response.Write(通过按钮的Click事件触发后显示!) End Sub Protected Sub Button1_Command(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.CommandEventArgs) Handles Button1.Command Label1.Text = Label1.Text + 1 End SubEnd Class2. 解释代码:请解释下述代码的含义。(10分)CalendarEx.aspx : 无标题页   密封线-CalendarEx.vb :Partial Class _Default Inherits System.Web.UI.Page Protected Sub Calendar1_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Calendar1.SelectionChanged Label1.Text = Calendar1.SelectedDate.ToShortDateString() End SubEnd Class得分评卷人四、网络基础名词解释(每小题5分,共10分)1. 请解释如图所示模型的含义。(5分)2. 请解释如图所示模型的含义。(5分)得分评卷人五、站点开发控件代码分析(每小题10分,共30分)1. 解释代码:请解释下述代码的含义。(10分)CompareValidatorEx.aspx :密封线 无标题页 结束时间必需大于开始时间 -CompareValidatorEx.vb :Partial Class _Default Inherits System.Web.UI.Page Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click CompareValidator1.Validate() If (CompareValidator1.IsValid = True) Then Response.Write(通过检验) End If End SubEnd Class2. 解释代码:请解释下述代码的含义。(10分)CustomValidatorEx.aspx : 无标题页 不是偶数 -CustomValidatorEx.vb :Partial Class _Default Inherits System.Web.UI.Page Protected Sub CustomValidator1_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator1.ServerValidate Dim i As Integer i = Integer.Parse(args.Value) If i Mod 2 = 0 Then args.IsValid = True Else args.IsValid = False End If End Sub Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click CustomValidator1.Validate() If (CustomValidator1.IsValid = True) Then Response.Write(通过检验) End If End SubEnd Class3. 解释代码:请解释下述代码的含义。(10分)LoginEx.aspx : 无标题页   -LoginEx.vb :Partial Class _Default Inherits System.Web.UI.Page Protected Sub Login1_Authenticate(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.AuthenticateEventArgs) Handles Login1.Authenticate End SubEnd Class得分评卷人六、内建组建对象代码分析(每小题10分,共20分)1. 解释代码:请解释下述代码的含义。(10分)Application.aspx : 无标题页 密封线-Application.vb :Partial Class _Default Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Application(times) = Now() Response.Write(访问时间为: + Application(times) End SubEnd Class2. 解释代码:请解释下述代码的含义。(10分)HttpBrowser.aspx : 无标题页 -HttpBrowser.vb :Partial Class _Default Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim bc As HttpBrowserCapabilities = Request.Browser Response.Write(您好,您正在使用 + bc.Browser + v. + bc.Version + ,你的运行平台是 + bc.Platform) End SubEnd Class基于WEB程序设计期末考试答案HTML代码分析(10分)1. 根据网页截图效果补充代码。(5分) 我的网页 2. 根据网页截图效果补充代码。(5分) row 1, cell 1 row 1, cell 2 row 2, cell 1 row 2, cell 2 数据库基础代码分析 (10分)1. 解释代码:请解释下述代码的含义。(5分)INSERT INTO article ( title, writer, content )VALUES (实验, 学生, 插入数据);答案要点:加入一条记录。2. 解释代码:请解释下述代码的含义。(5分)DELETE *FROM articleWHERE 编号=1;答案要点:删除符合条件的记录。标准控件代码分析 (20分)3. 解释代码:请解释下述代码的含义。(10分)ButtonEx.aspx : 无标题页 -ButtonEx.vb :Partial Class _Default Inherits System.Web.UI.Page Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Response.Write(通过按钮的Click事件触发后显示!) End Sub Protected Sub Button1_Command(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.CommandEventArgs) Handles Button1.Command Label1.Text = Label1.Text + 1 End SubEnd Class答案要点:ButtonEx控件应用。点击按钮后显示“通过按钮的Click事件触发后显示!”。4. 解释代码:请解释下述代码的含义。(10分)CalendarEx.aspx : 无标题页   -CalendarEx.vb :Partial Class _Default Inherits System.Web.UI.Page Protected Sub Calendar1_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Calendar1.SelectionChanged Label1.Text = Calendar1.SelectedDate.ToShortDateString() End SubEnd Class答案要点:CalendarEx控件。在结果页(同一页)显示选中的日期。网络基础名词解释 (10分)3. 请解释如图所示模型的含义。(5分)答案要点:C/S模型。由client上运行的应用程序发起与server的SQL会话。server之上运行着数据库。客户端与服务端的所有通信,都以直接的SQL语句形势存在。server返回client请求的数据集,由client进行处理后显示出来。界面在client上以Windows应用程序的方式直接显示。业务逻辑和界面显示都在client上,server端除数据库以外不提供任何功能。这实现了数据和业务逻辑的分离。4. 请解释如图所示模型的含义。(5分)答案要点:B/S模型。以ASP程序为例,由browser发起服务请求,其请求通过HTTP协议提交给web server的一个ASP页面。该页面在执行中,通过SQL会话向数据库提交请求,并获得数据集,以HTML的形式把处理后的结果提供给browser。browser显示HTML结果。界面在browser上以浏览器解释和渲染HTML页面的方式显示。业务逻辑运行在web server上,界面的解释和显示由browser完成,这实现了业务逻辑和表现的分离。站点开发控件代码分析 (30分)4. 解释代码:请解释下述代码的含义。(10分)CompareValidatorEx.aspx : 无标题页 结束时间必需大于开始时间 -CompareValidatorEx.vb :Partial Class _Default Inherits System.Web.UI.Page Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click CompareValidator1.Validate() If (CompareValidator1.IsValid = True) Then Response.Write(通过检验) End If End SubEnd Class答案要点:CompareValidator应用。以用户输入的两组数据的差异作为检验条件。5. 解释代码:请解释下述代码的含义。(10分)CustomValidatorEx.aspx : 无标题页 不是偶数 -CustomValidatorEx.vb :Partial Class _Default Inherits System.Web.UI.Page Protected Sub CustomValidator1_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator1.ServerValidate Dim i As Integer i = Integer.Parse(args.Value) If i Mod 2 = 0 Then args.IsValid = True Else args.IsValid = False End If End Sub Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click CustomValidator1.Validate() If (CustomValidator1.IsValid = True) Then Response.Write(通过检验) End If End SubEnd Class答案要点:CustomValidator应用。检查用户输入是否符合定制的要求。6. 解释代码:请解释下述代码的含义。(10分)LoginEx.aspx : 无标题页   -LoginEx.vb :Partial Class _Default Inherits System.Web.UI.Page Protected Sub Login1_Authenticate(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.AuthenticateEventArgs) Handles Login1.Authenticate End SubEnd Class答案要点:LoginEx应用。内建组建对象代码分析 (20分)3. 解释代码:请解释下述代码的含义。(1

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论