当前位置:首页 » 网页前端 » web课后题答案第二版
扩展阅读
webinf下怎么引入js 2023-08-31 21:54:13
堡垒机怎么打开web 2023-08-31 21:54:11

web课后题答案第二版

发布时间: 2023-04-10 06:12:51

‘壹’ 谁有计算方法(第二版)浙江大学出版的课后习题答案,有的话发给我,鄙人不胜感谢

(1)AbiCloud (Abiquo公司) AbiCloud 是一款用于公司的开源的云计算平台,使公司能够以快速、简单和可扩展的方式创建和管理指陆大型、复杂的IT基础设施(包括虚拟服务器、网络、应用、存储设备等) (2)Hadoop(Apache基金会) 该计划是完全模仿Google体系架构做的一个开源项目,主要包括Map/Rece和HDFS文件系统 (3)Eucalyptus 项目(加利福尼亚大学) 创建了一个使企业能够使用它们内部IT资源(包括服务器、存储系统、网络设备)的开源界面,来建立能够和Amazon EC2兼容的云 (4)MongoDB(10gen) MongoDB是一个高性能、开源、无模式的文档型数据唯碧顷库,它在许多场景下可用于替代传统的关系型数据库或键/值存储方式 (5)Enomalism弹性计算平台 它提供了一个功能类似于 EC2的云计算框架。Enomalism 基于 Linux,同时支持 Xen 和 Kernel Virtual Machine(KVM)。与其他纯IaaS 解决方案不同的是,Enomalism 提供了一个基于 Turbo Gears Web 应用程序框架和 Python 的软件栈 (6)Nimbus(网格中间件Globus) Nimbus面向科学计算需求,通过一组开源工具来实现基础设施即服务(IaaS)的云计算解决慧察方案
全球首个云计算平台落地中国
2009年7月22日,IBM与全球财富500强企业中国中化集团公司(以下称中化)一同召开了企业云计算平台新闻发布会。作为全球首个企业云计算项目,中化集团借ERP系统全面升级的契机,成功应用了IBM大中华区云计算中心(IBM Cloud Labs & HiPODS)提供的解决方案,将ERP系统部署于跨越两个数据中心的云端。不仅实现了ERP系统升级的平滑过渡,而且使得企业内部的IT基础设施以及各类软件应用未来能够运得更加灵活。云计算在我国多用于杀毒。

‘贰’ web程序设计asp.net实用网站开发 第2版 课后习题答案(沈士根版)

先分析原因。
你出现这个错误是因为你没有了解ASP.NET的工作原理。ASP.Net 和php,jsp ,asp等服务器语言一样 都是为了生成可供浏览器解析的页面,而可供浏览器解析的语言只有HTML。

1,如果你在aspx页面中插入一个asp:LinkButton 那么运行页面后 在浏览器中查看源代码你会发现这个标签实际被转为了一个<a>标签。
2,为什么你的写法不会转换呢?因为首先 传递给Literal1.Text 的值在asp.net中作为一段字符串被直接输出到浏览器中。那么你的写法到浏览器后源代码中仍然是一个asp:LinkButton 标签,而这个标签是无法被浏览器正确解析的。

解决办法:
知道了原因,那么如果非要按照你的写法去写,那么应该是这样的:
Literal1.Text = "<li>" + ((users)Session["users"]).Name.ToString() + "</li><li> </li><li><a ID='LinkButton1' onclick='LinkButton1_Click1'>注销</a></li><li> </li><li>信息修改</li><li> </li>";
但是当你修改完后发现点击注销按钮依然不能执行!为什么呢?
因为你的LinkButton1_Click1 事件并没有在asp.net中被解析为可供浏览器识别的js代码。

如何解决?

在aspx页面中写一个asp:LinkButton按钮:
<asp:LinkButton ID='LinkButton2' runat='server' onclick='LinkButton1_Click1'>注销</asp:LinkButton>

运行页面,查看源代码 看看这个新加的注销按钮被解析为了什么html代码,大概如下
<a id="LinkButton2" onclick="xxxxx"></a>

将新加的linkbutton 设置不可见属性
<asp:LinkButton ID='LinkButton2' runat='server' visible="false" onclick='LinkButton1_Click1'>注销</asp:LinkButton>

重新修改后台代码
Literal1.Text = "<li>" + ((users)Session["users"]).Name.ToString() + "</li><li> </li><li><a ID='LinkButton1' onclick='xxxxx'>注销</a></li><li> </li><li>信息修改</li><li> </li>";
//也就是将标签的js事件绑定到那个隐藏的注销按钮事件上。
希望对你有帮助

‘叁’ 全新版大学英语(第二版)综合教程2课后练习答案详解

《全新版大学英正唯碧语综合教程2课后习题答案.doc》网络网盘免费下载:
链举举接: https://pan..com/s/1fdecasq7iyWn9xPL7lToeA

提取码山迟: w41n


‘肆’ 新视野大学英语读写教程第三册,第二版的课后答案,要完整的~

新视野大学英语让竖散坦氏(第二版)第三册Unit 9
Unit 9
Section A
Vocabulary
III.
1. invitation 2. enforced 3. cited 4. awkward 5. inherited
6. dispute 7. exposure 8. valid 9. verified 10. justification
Exercises on Web course only:
11. editing 12. division 13. bind 14. payments 15. headline
IV.
1. She has certainly gained in confidence over the last couple of years.
2. The actor made the headlines for having an affair.
3. Greg’s parents are worried about his exposure to the kind of people they don’t approve of while he’s at college.
4. The opposition parties are calling for the minister’s resignation over the scandal.
5. The administration is in the process of drawing up a peace plan.
6. She’ll end up penniless if she keeps spending as much as that.
7. She lays bare her three unhappy marriages in her autobiography.
8. Hoping that he might be able to shed light on the problem, I asked Paul to look at the engine.
9. The outside influences have no bearing on what you can do for your basketball team.
10. Thank you; I’ll store that piece of ness away for a time when I might need it.
Exercises on Web course only:
11. “纤举Make no mistake about it,” he said, “this is the most serious threat our ecational system has ever seen.”
12. They worked much harder when they learned that they were in line for a wage increase.
13. For a time, they argued over which TV program to watch.
14. A car was stolen last nigh right under the nose of a security guard.
V.
1. N 2. G 3. I 4. J 5. E 6. M 7. D 8. K 9. C
10. B
Collocation
VI.
1. institutions 2. security 3. independence 4. rewards 5. markets
6. crisis 7. situation 8. aid 9. position 10. damages
Word Building
VII.
1. a tradition perfected by the Elizabethans
2. an exhibition of fine Victorian furniture
3. dance music with African roots
4. lots of shops run by Asians
5. make the British feel more European
6. contemporary Italian literature
7. some films of Hollywoodian style
8. some novels of Jamesian style
VIII.
1. Premarital 2. premature 3. pre-game 4. preplanned
5. pre-school 6. preexist 7. presuppose 8. prehistoric
Sentence Structure
IX.
1. He listens to the radio while driving to work.
2. He works in an American company while giving lectures on economics at a college in the evening.
3. In some societies professional women are treated as equals on the job while being treated as servants at home.
4. We should be pupils while serving as teachers.
5. The two professors will exchange their views while attending a meeting in Paris.
X.
1. Not even once did this thought come to her mind.
2. No sooner were they released by order of the court than they were rearrested by the police.
3. By no means is it easy to pass the test when you are not spending enough time preparing.
4. Seldom did the couple go to the theater together ring their stay in the USA.
5. Not until we understand the person who has the disease can we understand the disease.
Translation
XI.
1. Word came yesterday that they were killed while trying to reach the summit.
2. Under no circumstances shall I mention to anyone that I have turned down the invitation to her wedding.
3. It made the headlines that the president’s wife threatened her husband with public exposure.
4. That wealthy lady’s repeated demand for a premarital agreement greatly harmed her prospective husband’s self-esteem and ended up in his refusal to get married.
5. Make no mistake about it, some women would insist on the right to get a divorce if their husbands did not earn as much as they expected.
6. The casual discovery of the fingerprint shed some light on the murder he had been looking into.
XII.
1. 现如今太多的人似乎都是边看电视边吃东西,几乎没注意自己吃的是什么、吃了多少。
2. 我怎么也没有料到没有我你会生活得这么惬意。
3. 他在支票上伪造他哥哥的签名,以不正当手段得到了这笔钱,这件事后来被媒体曝了光。
4. 他举了个典型的例子来说明警官是出于自卫朝那人开的枪,因为那人先朝他开枪。
5. 专家普遍认为包含对人的健康有很重要的影响。
6. 在中国婚前协议的例子不多,这说明婚前协议尚不为众人接受,尽管离婚会涉及财产分配问题。
Cloze
XIII.
1. B 2.C 3. A 4. D 5. B 6. A 7. B 8. D
9. C 10. D 11. C 12. C 13. A 14. D 15. B 16. B
17. D 18. B 19. A 20. C
新视野大学英语(第二版)第三册Unit 10
SECTION A
Pre-reading activities
W: In just a minute, we'll introce an old friend of yours, and I'll interview you both about your unique friendship. But first, do you have something to say?
M: I'd like to make something clear. The man isn't my friend, well, not really.
W: You mean you don't like him?
M: No. That's not quite it I've never met him.
W: How do you know him then?
M: My family members always told me how great he was. It really made me angry at times. But I guess it was kind of good for me too, because it caused me to work harder and harder.
W: I'm excited to hear more! Let's bring him out here and learn what he has to say!
1. The man isn't really his friend.
2. He was great
3. (Open-ended.)
Comprehension of the Text
I:
1. He thought that Aunt Carrie was his favorite relative and favorite authority figure, and that she was generous with smiles, praise and was tolerant.
2. He did not feel good about it, because his first day was disastrous and John's went well.
3. John advanced quickly while the writer was slow.
4. He took them as a challenge although disliked them
5. He thought that his stories were an extension of his own desires to rise above John Bullyer.
6. He learned about John mainly through newspapers.
7. They both thought that the other was taller, smarter, and more handsome.
8. Both of them were finally positive about their life competition, because they both felt grateful to their aunt.
Vocabulary
III.
1.harness 2.percentage 3.impose 4.authorities 5.dreading 6.drawbacks 7.universe 8.extension 9.broaden 10.practically
Exercises on Web course only:
11. dynamic 12. spacecraft 13. specimen
IV.
1. on 2. with 3. to 4. with 5. by 6. to 7. At 8. as 9. for 10. on/upon
Exercises on Web course only:
11. for 12. for
V.
1.L 2.J 3.O 4.C 5.H 6. M 7. A 8.G 9.F 10. D
Collocation
VI.
1. defeat 2. truth 3. responsibility 4. guilt 5 need 6. mistake 7. love 8. effect 9. fact 10. identity
N
Concordance
File
1
I could then admit defeat and lie down and die.
erb1u03
2
One of the problems we may have, regarding lying, is not having as honest enough heart to admit the truth
tbb1u10
3
None of these people will admit responsibility for their actions.
tbb1u02
4
He admitted his guilt
nwb1u02
5
Presently, many, if not most Americans, admit the need for tighter laws to control the ownership of handguns
tbb1u07
6
From my standpoint, you should admit your mistakes and try hard next time.
tbb2u09
7
When are you going to admit year love for me?
sb2u04
8
They don't care why yon did it—they just want yon to admit the great effect your behavior had on them.
srb2u05
9
They think they must admit this fact in order to get rid of their problems
tbb2u07
10
With more than a suggestion of discomfort, he spoke my name and I, somewhat reluctantly, admitted my identity.
rwsb3u10
Word Building
VII.
1. subordinate 2. subheadings 3. submerging 4. subdivided 5. subcontinent 6. submarine 7. subhuman 8. subway
VIII.
l.e 2.h 3.b 4.c 5.g 6.d 7.f 8. a
Sentence Structure
1. Wherever you go, you can always find Coca-Cola.
2. However rich people are, they always want more.
3. Whoever you marry, make sure he can cook.
4. Whichever day you come, we'll be pleased to see you.
5. They found the people friendly wherever they went
X.
1. Turn on TV and you will often see advertisements snowing happy, balanced families.
2. Five minutes earlier and you could have caught the last train.
3. Start acting like a hero and I'll hit you.
4. Work hard and you'll pass your examinations.
5. Arrive late once more and you'll be fired.
Translation
XI.
1.1 went to the library and read whatever I could find about the causes of the mysterious disappearances of the ships and planes in the Bermuda Triangle.
2. Continue treating friends like this, and you will lose them all.
3. They must know their proct thoroughly and know how to promote sales by word of mouth, telephone or letter.
4. It suddenly dawned on me that money couldn't make up for all that he had suffered in the past five years.
5. Some people refer to translation as science while others take it as art.
6. Instead of imposing personal views upon others, we should promote democracy.
XII.
1.当然新演员绝对不能停步不前,而应该尽可能地创造机会。
2.他得寸进尺。
3.我想我们的关系很好,我们是朋友。但是外面现在正在竞争,将来也会。无论我们做什么,无论我们在什么地方,我们将还会相互竞争。
4.退休后,他远离政治,开始打网球。他发现打网球是一种很好的放松方式。
5.过了一会,显然带着不情愿,他在电话里承认了自己的身份,并请求我原谅他。
6.在我看来,当老师的唯一缺陷,是它不太会引起公众的注意。
Cloze
XIII.
l.B 2.C 3. A 4.B 5.D 6. A 7. B 8. D 9. C 10. B 11. B 12. A 13. B 14. D 15. B 16. A 17. C 18. D 19. A 20. B

‘伍’ 计算机二级《Web程序设计》试题及答案

计算机二级《Web程序设计》试题及答案

1在下列的HTML中,正确产生超链接的标记是()。

A.新浪网B.新浪网C.http:///WWW.sina.Corn.cnD.新浪网

参考答案:B

2下面协议中用于在Web浏览器和服务器之间传输Web文档的是()。

A.NFSB.FTPC.HTTPD.DNS

参考答案:C

3在HTTP响应的MIME消息体中,可以同时包含如下类型的数据()。

i .文本数据 ii.图片数据 iii.视频数据 iv.音频数据

A.仅iB.i和iiC.i、ii和iiiD.全都可以

参考答案:D

4HTTP协议是一种()协议。

A.文件传输协议B.邮件协议C.远程登录协议D.超文本传输协议

参考答案:D

5在HTML文档中使用的注释符号是()。

A.//…B./*……*/C.D.以上说法均错误

参考答案:C

6HTTP请求消息中可以不包含()。

i.开始行 ii.消息头iii.消息体实体数据

A.仅iB.i和iiC.ii和 iiiD.仅iii

参考答案:C

7下列技术中控制文档结构的.是()。

A.DOMB.CSSC.JavaScriptD.XMLHttpRequest

参考答案:A

8下列语言编写的代码中,在浏览器端执行的是()。

A.wt h页面中的c#代码

B.Web页面中的Java代码

C.Web页面中的PHP代码

D.Web页面中的JavaScript代码

参考答案:D

9在HTTP/1.1协议中,持久连接选项是()的。

A.默认关闭B.默认打开C.不可协商D.以上都不对

参考答案:B

10以下不是HTTP协议的特点的是()。

A.持久连接B.请求/响应模式C.只能传输文本数据D.简单、高效

参考答案:C

11下列语句中,正确打开名为“window2"的新窗口的JavaScript语句是()。

A.open.new("http://www.sina.COB.cn","window2")

B.new.window("http://www.sina.con.cn","window2")

C.new("http://www.sina.com.cn","window2")

D.window.open("http://www.sina.tom.cn","window2")

参考答案:D

12以下选项中,全部都是表格标记的是()。

参考答案:B

13下列关于ASP.NET的描述中,错误的是()。

A.ASP.NET依赖于微软的.NET框架

B.ASP.NET采用纯面向对象语言比采用脚本语言的执行效率高

C.ASP.NET采用代码分离技术有利于开发协作

D.ASP.NET和ASP都采用了JavaScript编程语言

参考答案:D

14下列函数中能够把6.25四舍五入为最接近的整数的是()。

A.round(6.25)B.rnd(6.25)C.Math.rnd(6.25)D.Math.round(6.25)

参考答案:D

15目前在Internet上应用最为广泛的服务是()。

A.FTP服务B.Web服务C.Telnet服务D.Gopher服务

参考答案:B

16下列正确地在CSS文件中插入注释的语句是()。

A.//this is a commentB.//this is a comment//C./*this is a comment*/D.'this is a comment

参考答案:C

17下列不属于动态网页格式的是()。

A.ASPB.JSPC.ASPXD.VBS

参考答案:D

18以下语句中,正确制作电子邮件链接的是()。

参考答案:C

19下列哪个样式能够显示这样一个边框:上边框10像素、下边框5像素、左边框20像素、右边框l像素?()

A.border—width:10px 5px 20px 1px

B.border—width:10px 20px 5px 1px

C.border—width:5px 20px l0px 1px

D.border—width:10px 1px 5px 20px

参考答案:D

20CSS 主要用下列哪个HTML标记构建页面布局?()

参考答案:B

21在下列选项中,正确地产生文本区(textarea)的标记是()。

参考答案:A

22在访问的URL http://Cms.bit.e.Cn:8080/login.aspx中,http表示()。

A.端口号B.文件名C.访问协议D.主机名

参考答案:C

23下列标记中不属于行内元素的是()。

参考答案:D

24在HTML文档中用于表示页面标题的标记对是()。

参考答案:D

25下列符合CSS语法的正确语句是()。

A.body:color=blackB.{body;color:black}C.body{color:black;}D.{body:color=black}

参考答案:C


更多计算机二级试题推荐:

1. 2016年9月计算机二级web考试试题及答案

2. 计算机二级《Web程序设计》试题及答案

3. 计算机二级考试WEB试题及答案

4. 2016计算机二级考试《Web程序设计》练习题模拟

5. 2016计算机二级考试高级Office试题及答案

6. 2016最新计算机二级考试试题及答案

7. 2016年计算机二级office高级应用试题【题库】

8. 2016计算机二级等级考试题型分析

9. 2016下半年计算机二级ps试题及答案

10. 计算机二级Office考试试题及答案

;

‘陆’ WEB数据库设计与应用(试题求答案)

CCDDDABCCCC

‘柒’ web程序设计 第三版 课后题答案 主编 吉根林 顾云华 [email protected]

Web程序设计第3章课后题

注:课后题共7题(除第一题和第九题),其中5和8由于还有些问题没有解决,就没有将答案附上。这里的答案仅供参考,希望在上机之前能自己练习一下。程序有很多地方可以改,不要照搬。

(2)设计一个网页,其中包含TextBox和Button控件各一个。当在TextBox中输入一个成绩,再单击Button控件时在网页上输出相应的等级信息。
【.aspx】
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="question2.aspx.cs" Inherits="homework_chap3.question2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server">请输入一个成绩</asp:TextBox>
<asp:Label ID="Label1" runat="server" Text="Label">待显示</asp:Label>
<br />
<asp:Button ID="Button1" runat="server" OnClick = "btmSubmit_Click" Text="检测" />
</div>
</form>
</body>
</html>
【.aspx.cs】
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace homework_chap3
{
public partial class question2 : System.Web.UI.Page
{
protected void btmSubmit_Click(object sender, EventArgs e)
{
int iInput = int.Parse(TextBox1.Text);
if (iInput > 100)
Label1.Text = "请输入正确的分数";
else if(iInput >= 90)
Label1.Text = "优秀";
else if (iInput >= 80)
Label1.Text = "良好";
else if (iInput >= 60)
Label1.Text = "及格";
else if (iInput >= 0)
Label1.Text = "不及格";
else
Label1.Text = "请输入正确的分数";
}
}
}

【效果】

(3)在网页上输出九九乘法表
【.aspx.cs】(.aspx源文件可以不作处理)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace homework_chap3
{
public partial class question3 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
for (int i=1; i<= 9; i++)
{
for (int j = 1; j <= i; j++)
{
Response.Write(i + "*" + j + "=" + (i * j) + "");
}
Response.Write("</br>");
}
}
}
}

【效果】

(4)在网页上输出如下形状:
A
BBB
CCCCC
DDD
E

【.aspx.cs】(.aspx源文件可以不作处理)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace homework_chap3.questions
{
public partial class question4 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
String[] s = { "A", "B", "C", "D", "E" };
for (int i = 1; i <= 3; i++)
{
for (int j = 1; j <= 3 - i; j++)
{
Response.Write("");
}
for(int k = 1; k <= 2*i-1; k++)
{
Response.Write(s[i-1]);
}
Response.Write("</br>");
}
for (int i = 1; i < 3; i++)
{
for (int j = 1; j <= i; j++)
{
Response.Write("");
}
for (int k = 1; k <= 5 - 2*i; k++)
{
Response.Write(s[i + 2]);
}
Response.Write("</br>");
}
}
}
}

【效果】

(6)设计一个网页,其中包含两个TextBox和一个Button控件。当在TextBox中各输入一个数值,再单击Button控件时在网页上输出两者相除的数值。(要求包含异常处理)
【.aspx】
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="question6.aspx.cs" Inherits="homework_chap3.questions.question6" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>

<asp:Label ID="Label1" runat="server" Text="Label">输入一个除数:</asp:Label>
<asp:TextBox ID="TextBox1" runat="server" Width="104px"></asp:TextBox>
<br />
<asp:Label ID="Label2" runat="server" Text="Label">输入一个被除数:</asp:Label>
<asp:TextBox ID="TextBox2" runat="server" Width="104px"></asp:TextBox>
<br />
<asp:Button ID="Button1" runat="server" OnClick="btm_click" Text="计算" />
<asp:Label ID="Label3" runat="server" Text="Label">答案</asp:Label>

</div>
</form>
</body>
</html>

【.aspx.ce】
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace homework_chap3.questions
{
public partial class question6 : System.Web.UI.Page
{
protected void btm_click(object sender, EventArgs e)
{
int[] str = new int[1];
int iInput1 = int.Parse(TextBox1.Text);
int iInput2 = int.Parse(TextBox2.Text);
if (iInput2 == 0)
throw new Exception("除数不能为0");
else
Label3.Text = (iInput1 / iInput2).ToString();
}
}
}

【效果】

(7)设计一个用于用户注册页面的用户信息类UserInfo,它包括两个属性:姓名(Name)、生日(Birthday);一个方法DecideAge:用于判断用户是否达到规定年龄,对大于等于18岁的在页面上输出“您是成人了!”,而小于18岁的在页面上输出“您还没长大呢!”

【.aspx】
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="question7.aspx.cs" Inherits="homework_chap3.questions.question71" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label3" runat="server" Text="Label">注册</asp:Label>
<br /><br />
<asp:Label ID="Label1" runat="server" Text="Label">姓名</asp:Label>
<asp:TextBox ID="TextBox1" runat="server">如“朱晓栋”</asp:TextBox>
<br />
<asp:Label ID="Label2" runat="server" Text="Label">生日</asp:Label>
<asp:TextBox ID="TextBox2" runat="server">如“19890411”</asp:TextBox>
<br />
<asp:Button ID="Button1" runat="server" OnClick="btm_click" Text="注册" />
</div>
</form>
</body>
</html>

【.aspx.cs】
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace homework_chap3.questions
{
public partial class question71 : System.Web.UI.Page
{
protected void btm_click(object sender, EventArgs e)
{
int iInput2 = int.Parse (TextBox2.Text);
question7 que = new question7("zhu",19890411);
que.DecideAge(iInput2);
}
}
}

【.cs】
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace homework_chap3.questions
{
public class question7
{
private string _Name;
private int _Brithday;
public string Name
{
get
{
return this._Name;
}
set
{
this._Name = value;
}
}
public int Brithday
{
get
{
return this._Brithday;
}
set
{
this._Brithday = value;
}
}
public question7(String name, int brithday)
{
this._Name = name;
this._Brithday = brithday;
}
public void DecideAge(int brithday)
{
if (20101001 - brithday < 180000)
throw new Exception("您还没长大呢!");
else
throw new Exception("您是成人了!");
}
}
}

【效果】

是这个么