高级软件卡发技术ASP考试复习资料.docx

上传人:b****6 文档编号:7002857 上传时间:2023-01-16 格式:DOCX 页数:7 大小:16.71KB
下载 相关 举报
高级软件卡发技术ASP考试复习资料.docx_第1页
第1页 / 共7页
高级软件卡发技术ASP考试复习资料.docx_第2页
第2页 / 共7页
高级软件卡发技术ASP考试复习资料.docx_第3页
第3页 / 共7页
高级软件卡发技术ASP考试复习资料.docx_第4页
第4页 / 共7页
高级软件卡发技术ASP考试复习资料.docx_第5页
第5页 / 共7页
点击查看更多>>
下载资源
资源描述

高级软件卡发技术ASP考试复习资料.docx

《高级软件卡发技术ASP考试复习资料.docx》由会员分享,可在线阅读,更多相关《高级软件卡发技术ASP考试复习资料.docx(7页珍藏版)》请在冰豆网上搜索。

高级软件卡发技术ASP考试复习资料.docx

高级软件卡发技术ASP考试复习资料

考试范围及重点

1、ASP.NET内置的对象有哪些?

ASP.NET内置了Response、Request、Server、Application、Session和Cookie等对象。

2、ASP.NET验证控件有哪些?

必须字段验证控件RequiredFieldValidator,比较验证控件CompareValidator,范围验证控件RangeValidator,正则表达式验证控件RegularExpressionValidator,自定义验证控件CustomValidator,验证总结控件ValidationSummary。

3、this.IsPostBack什么时候取值为true,什么时候取值为false?

当页面是第一次加载时,Page.IsPostBack为false,页面回传时Page.IsPostBack为true。

4、Request对象什么情况下用QueryString集合从客户端接收信息?

当form表单以get方式(method=get)提交到服务器时,服务器用Request对象的QueryString集合从客户端接收信息。

5、Application对象与Session对象的区别?

两者的应用范围不同。

Session是对应某一个用户的。

而Application是整个WEB应用程序共用的。

两者的存活时间不同。

Session是在站点的页面从打开到被关闭之前一直生存的,关闭或跳转到其它网站就会使Session死亡。

而Application是从站点发布以来一直存活的,除非重启了站点服务,IIS。

Session的中文是"会话"的意思,ASP中Session代表了服务器与客户端之间的"会话"。

Application对象是一个应用程序级的对象,它包含的数据可以在整个Web站点中被所有用户使用,并且可以在网站运行期间持久地保存数据。

6、修改存储在Application对象中的变量应该注意什么?

因为多个用户可以共享一个Application对象,所以必须要用Lock和Unlock方法,以确保多个用户无法同时改变某一属性。

7、Server.HtmlEncode方法的功能是什么?

对输出的内容不进行编码直接输出。

即HTML标记按文本显示。

8、Server.HtmlDecode方法的功能是什么?

对已被编码以消除无效HTML字符的字符串进行解码。

9、Request对象什么情况下用Form集合从客户端接收信息?

当form表单以post方式(method=post)提交到服务器时,服务器用Request对象的Form集合从客户端接收信息。

10、列举出2个从当前页转到另一页执行的ASP.NET内置对象方法?

Server.Transfer(“网址”)

Server.Execute(“网址”)

Response.Redirect(“网址”);

11、Cookie的缺点是什么?

大小受限制,用户可以配置为禁用,有潜在的安全风险。

12、使用Cookie的优点是什么?

可配置到期规则,不需要任何服务器资源,数据持久性,简单性

13、AutoPostBack属性的作用?

 

14、往网页页面上输写字符串用Response对象的什么方法?

Response.Write(“要输出的字符串”);

15、Server.UrlEncode方法的功能是什么?

答:

编码URL字符串。

16、Server.UrlDecode方法的功能是什么?

答:

对字符串进行解码.

 

练习1

//www.w3.org/1999/xhtml">

functionfun1(){

alert("youcalljavascriptfunction.");

}

functionfun2(){

alert("youcalljavascriptfunction2.");

}

protectedvoidButton1_Click(objectsender,EventArgse)

{

Response.Write("somebooks.");

}

protectedvoidButton2_Click(objectsender,EventArgse)

{

Response.Write("helloworld!

");

}

id="btn1"runat="server"value="按钮1"/>

onserverclick="Button1_Click"

id="btn2"runat="server"/>

ButtonID="btn3"OnClientClick="fun2()"

runat="server"Text="按钮3"/>

ButtonID="btn4"runat="server"

Text="按钮4"OnClick="Button2_Click"/>

 

练习2

页面代码:

征求意见

用户名:

TextBoxID="txtname"

runat="server">

TextBox>

性别:

RadioButtonID="rad1"runat="server"

Text="男"GroupName="se"/>

RadioButtonID="rad2"runat="server"

Text="女"GroupName="se"/>

意见:

TextBoxid="txtm"runat="server"

TextMode="MultiLine">

TextBox>

ButtonID="Button1"runat="server"

Text="提交"OnClick="Button1_Click"/>

C#后台代码:

protectedvoidButton1_Click(objectsender,EventArgse)

{

stringtemp="早上好,"+txtname.Text;

if(rad1.Checked)

{temp=temp+"先生";}

else

{temp=temp+"女士";}

temp=temp+",你的意见是"+txtm.Text+".";

this.ClientScript.RegisterStartupScript(

this.GetType(),"",

"");

}

控件有哪些:

1.文本框

2.Label

3.Page132

4.CheckBox

5.CheckBoxList

6.RadioButton

7.RadioButtonList

8.下拉列表

9.Image

10.Button

11.

12.表格

 

练习2.2

protectedvoidButton1_Click(objectsender,EventArgse)

{

stringtemp="早上好,"+txtname.Text;

if(rad1.Checked)

{temp=temp+"先生";}

else

{temp=temp+"女士";}

temp=temp+",你的意见是"+txtm.Text+".";

this.ClientScript.RegisterStartupScript(

this.GetType(),"",

"");

}

征求意见

用户名:

TextBoxID="txtname"

runat="server">

TextBox>

性别:

RadioButtonID="rad1"runat="server"

Text="男"GroupName="se"/>

RadioButtonID="rad2"runat="server"

Text="女"GroupName="se"/>

意见:

TextBoxid="txtm"runat="server"

TextMode="MultiLine">

TextBox>

ButtonID="Button1"runat="server"

Text="提交"OnClick="Button1_Click"/>

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 外语学习 > 日语学习

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1