當前位置:首頁 » 網頁前端 » 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("您是成人了!");
}
}
}

【效果】

是這個么