毕业论文

打赏
当前位置: 毕业论文 > 外文文献翻译 >

ASP.NET技术先进的控件编程英文文献和中文翻译(2)

时间:2021-06-30 18:00来源:毕业论文
For this reason, in the past, many developers decided to add all their form validation logic exclusively to server-side code. Because server-side code functions correctly with any browser, this course

For this reason, in the past, many developers decided to add all their form validation logic exclusively to server-side code. Because server-side code functions correctly with any browser, this course of action was safer.

Fortunately, the Validation controls discussed in this chapter do not force you to make this difficult choice. The Validation controls automatically generate both client-side and server-side code. If a browser is capable of supporting JavaScript, client-side validation scripts are automatically sent to the browser. If a browser is incapable of supporting JavaScript, the validation routines are automatically implemented in server-side code.

You should be warned, however, that client-side validation works only with Microsoft Internet Explorer version 4.0 and higher. In particular, the client-side scripts discussed in this chapter do not work with any version of Netscape Navigator.

B.原文的翻译

ASP.NET技术

——先进的控件编程

保存浏览状态

默认地,几乎所有的 ASP.NET 控件都会在先前的窗体中保留他们的属性值。 举例来说,如果你输入文本到一个Lebel标签上然后提交那个页面,当那个页面再次被访问那个Lebel标签的内容将会被保存下来。论文网

浏览状态的妙处是它不依赖任何的特定服务器或浏览器的属性。 尤其,它不依赖cookies, session变量、或应用程序变量。 浏览状态在一个名叫做VIEWSTATE的隐藏页面中执行,这个隐藏页面自动创建每个Web窗体。

当灵活的应用时, 浏览状态能够在你的网站中产生艺术性的和积极的效果,例如:如果你在一个支持浏览状态的控件中显示数据库数据,你不需要每次都返回到需要反馈到服务器的数据库页面。 你能够自动地保存页面里的数据状态。

显示和隐藏内容

假想你正在用一个可选择的部分创造页面。 举例来说,假想你正在创造一种在线纳税系统,而且你想要显示或者隐藏一个包含适用于已婚的税文件编档员的问题的部分。

或者, 假想你想要添加一个帮助按钮到网站上去。 你可能想要隐藏或者显示完成依靠用户参考的问题的详细说明。

最后,假想你想要把一个tax form 变成很多页面,以便一个人每次只看那个tax form的一部分。

在下列的部分中,你学会用属性设置在一个窗体中来隐藏或显示控件。 你学会用单个控件和一组控件设置Visible and Enabled属性来隐藏和显示页面内容。

ASP.NET技术先进的控件编程英文文献和中文翻译(2):http://www.751com.cn/fanyi/lunwen_77588.html
------分隔线----------------------------
推荐内容