菜单
  

    2. Advanced Control Programming
    Working with View State
    By default, almost all ASP.NET controls retain the values of their properties between form posts. For example, if you assign text to a Label control and submit the form, when the page is rendered again, the contents of the Label control are preserved.
    The magic of view state is that it does not depend on any special server or browser properties. In particular, it does not depend on cookies, session variables, or application variables. View state is implemented with a hidden form field called VIEWSTATE that is automatically created in every Web Forms Page.
    When used wisely, view state can have a dramatic and positive effect on the performance of your Web site. For example, if you display database data in a control that has view state enabled, you do not have to return to the database each time the page is posted back to the server. You can automatically preserve the data within the page's view state between form posts.
    Displaying and Hiding Content
    Imagine that you are creating a form with an optional section. For example, imagine that you are creating an online tax form, and you want to display or hide a section that contains questions that apply only to married tax filers.
    Or, imagine that you want to add an additional help button to the tax form. You might want to hide or display detailed instructions for completing form questions depending on a user's preferences.
    Finally, imagine that you want to break the tax form into multiple pages so that a person views only one part of the tax form at a time.
    In the following sections, you learn about the properties that you can use to hide and display controls in a form. You learn how to use the Visible and Enabled properties with inpidual controls and groups of controls to hide and display page content.
    Disabling View State
    In certain circumstances, you might want to disable view state for an inpidual control or for an ASP.NET page as a whole. For example, you might have a control that contains a lot of data (imagine a RadioButtonList control with 1,000 options). You might not want to load the data into the hidden __VIEWSTATE form field if you are worried that the form data would significantly slow down the rendering of the page.
    B.原文的翻译ASP.NET 技术1.构建 ASP.NET 页面ASP.NET 和ASP.NET结构
    ASP.NET是微软.NET framework整体的一部分, 它包含一组大量的编程用的类,满足各种编程需要。
    .NET类库
    举例来说,对于每一种语言,必须包括存取文件系统、与数据库协同工作和操作字符串的方法。论文网
    此外,这些语言包含相似的编程构造。每种语言,举例来说,都能够使用循环语句和条件语句。即使用Visual Basic写的条件语句的语法不与用C++写的不一样,程序的功能也是相同的。
    最后,大多数的编程语言有相似的数据变量类型。对大多数的语言,你有设定字符串类型和整型数据类型的方法。
    .NET类库不完全是那样。 它含有大量的满足编程需要的类。举例来说,.NET类库包含处理数据库访问的类和文件协同工作,操作文本和生成图像。 除此之外,它包含更多特殊的类用在正则表达式和处理Web协议。
    .NET framework,此外包含支持所有的基本变量数据类型的类,比如:字符串、整型、字节型、字符型和数组。
  1. 上一篇:Java与网络英文文献和中文翻译
  2. 下一篇:中国餐饮业分析英文文献和中文翻译
  1. 汽车乘员舱的声振耦合英文文献和中文翻译

  2. 立体光照成型的注塑模具...

  3. 数控机床英文文献和中文翻译

  4. 工业机械手英文文献和中文翻译

  5. 低频振动的铁路车轴的状...

  6. 接头的形状对沥青塞接头...

  7. 数控加工技术英文文献和中文翻译

  8. 十二层带中心支撑钢结构...

  9. 河岸冲刷和泥沙淤积的监测国内外研究现状

  10. 大众媒体对公共政策制定的影响

  11. 电站锅炉暖风器设计任务书

  12. 乳业同业并购式全产业链...

  13. 酸性水汽提装置总汽提塔设计+CAD图纸

  14. 杂拟谷盗体内共生菌沃尔...

  15. 当代大学生慈善意识研究+文献综述

  16. java+mysql车辆管理系统的设计+源代码

  17. 中考体育项目与体育教学合理结合的研究

  

About

751论文网手机版...

主页:http://www.751com.cn

关闭返回