


免费预览已结束,剩余5页可下载查看
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
本文档系作者精心整理编辑,实用价值高。外文文献原文What is ASP.NET? ASP.NET is a programming framework built on the common language runtime that can be used on a server to build powerful Web applications. ASP.NET offers several important advantages over previous Web development models:Enhanced Performance. ASP.NET is compiled common language runtime code running on the server. Unlike its interpreted predecessors, ASP.NET can take advantage of early binding, just-in-time compilation, native optimization, and caching services right out of the box. This amounts to dramatically better performance before you ever write a line of code.World-Class Tool Support. The ASP.NET framework is complemented by a rich toolbox and designer in the Visual Studio integrated development environment. WYSIWYG editing, drag-and-drop server controls, and automatic deployment are just a few of the features this powerful tool provides.Power and Flexibility. Because ASP.NET is based on the common language runtime, the power and flexibility of that entire platform is available to Web application developers. The .NET Framework class library, Messaging, and Data Access solutions are all seamlessly accessible from the Web. ASP.NET is also language-independent, so you can choose the language that best applies to your application or partition your application across many languages. Further, common language runtime interoperability guarantees that your existing investment in COM-based development is preserved when migrating to ASP.NET.Simplicity. ASP.NET makes it easy to perform common tasks, from simple form submission and client authentication to deployment and site configuration. For example, the ASP.NET page framework allows you to build user interfaces that cleanly separate application logic from presentation code and to handle events in a simple, Visual Basic - like forms processing model. Additionally, the common language runtime simplifies development, with managed code services such as automatic reference counting and garbage collection.Manageability. ASP.NET employs a text-based, hierarchical configuration system, which simplifies applying settings to your server environment and Web applications. Because configuration information is stored as plain text, new settings may be applied without the aid of local administration tools. This zero local administration philosophy extends to deploying ASP.NET Framework applications as well. An ASP.NET Framework application is deployed to a server simply by copying the necessary files to the server. No server restart is required, even to deploy or replace running compiled code.Scalability and Availability. ASP.NET has been designed with scalability in mind, with features specifically tailored to improve performance in clustered and multiprocessor environments. Further, processes are closely monitored and managed by the ASP.NET runtime, so that if one misbehaves (leaks, deadlocks), a new process can be created in its place, which helps keep your application constantly available to handle requests.Customizability and Extensibility. ASP.NET delivers a well-factored architecture that allows developers to plug-in their code at the appropriate level. In fact, it is possible to extend or replace any subcomponent of the ASP.NET runtime with your own custom-written component. Implementing custom authentication or state services has never been easier.Security. With built in Windows authentication and per-application configuration, you can be assured that your applications are secure. Data Binding Overview and Syntax ASP.NET introduces a new declarative data binding syntax. This extremely flexible syntax permits the developer to bind not only to data sources, but also to simple properties, collections, expressions, and even results returned from method calls. The following table shows some examples of the new syntax. Although this syntax looks similar to the ASP shortcut for Response.Write - - its behavior is quite different. Whereas the ASP Response.Write shortcut syntax was evaluated when the page was processed, the ASP.NET data binding syntax is evaluated only when the DataBind method is invoked. DataBind is a method of the Page and all server controls. When you call DataBind on a parent control, it cascades to all of the children of the control. So, for example, DataList1.DataBind() invokes the DataBind method on each of the controls in the DataList templates. Calling DataBind on the Page - Page.DataBind() or simply DataBind() - causes all data binding expressions on the page to be evaluated. DataBind is commonly called from the Page_Load event, as shown in the following example. You can use a binding expression almost anywhere in the declarative section of an .aspx page, provided it evaluates to the expected data type at run time. The simple property, expression, and method examples above display text to the user when evaluated. In these cases, the data binding expression must evaluate to a value of type String. In the collection example, the data binding expression evaluates to a value of valid type for the DataSource property of ListBox. You might find it necessary to coerce the type of value in your binding expression to produce the desired result. For example, if count is an integer: Number of Records: Binding to Simple Properties The ASP.NET data binding syntax supports binding to public variables, properties of the Page, and properties of other controls on the page. The following example illustrates binding to a public variable and simple property on the page. Note that these values are initialized before DataBind() is called. The following example illustrates binding to a property of another control. Binding to Collections and Lists List server controls like DataGrid, ListBox and HTMLSelect use a collection as a data source. The following examples illustrate binding to usual common language runtime collection types. These controls can bind only to collections that support the IEnumerable, ICollection, or IListSource interface. Most commonly, youll bind to ArrayList, Hashtable, DataView and DataReader. The following example illustrates binding to an ArrayList. The following example illustrates binding to a DataView. Note that the DataView class is defined in the System.Data namespace. The following example illustrates binding to a Hashtable. Binding Expressions or Methods Often, youll want to manipulate data before binding to your page or a control. The following example illustrates binding to an expression and the return value of a method. DataBinder.Eval The ASP.NET framework supplies a static method that evaluates late-bound data binding expressions and optionally formats the result as a string. DataBinder.Eval is convenient in that it eliminates much of the explicit casting the developer must do to coerce values to the desired data type. It is particularly useful when data binding controls within a templated list, because often both the data row and the data field must be cast. Consider the following example, where an integer will be displayed as a currency string. With the standard ASP.NET data binding syntax, you must first cast the type of the data row in order to retrieve the data field, IntegerValue. Next, this is passed as an argument to the String.Format method. This syntax can be complex and difficult to remember. In contrast, DataBinder.Eval is simply a method with three arguments: the naming container for the data item, the data field name, and a format string. In a templated list like DataList, DataGrid, or Repeater, the naming container is always Container.DataItem. Page is another naming container that can be used with DataBinder.Eval. The format string argument is optional. If it is omitted, DataBinder.Eval returns a value of type object, as shown in the following example. It is important to note that DataBinder.Eval can carry a noticeable performance penalty over the standard data binding syntax because it uses late-bound reflection. Use DataBinder.Eval judiciously, especially when string formatting is not required. Section SummaryThe ASP.NET declarative data binding syntax uses the notation. You can bind to data sources, properties of the page or another control, collections, expressions, and results returned from method calls. List controls can bind to collections that support the ICollection, IEnumerable, or IListSource interface, such as ArrayList, Hashtable, DataView, and DataReader. DataBinder.Eval is a static method for late binding. Its syntax can be simpler than the standard data binding syntax, but performance is slower. Section SummaryThe DataList and Repeater controls provide developers fine-tuned control over the rendering of data-bound lists. Rendering of bound data is controlled using a template, such as the HeaderTemplate, FooterTemplate, or ItemTemplate. The Repeater control is a general-purpose iterator, and does not insert anything in its rendering that is not contained in a template. The DataList control offers more control over the layout and style of items, and outputs its own rendering code for formatting. The DataList supports the Select, Edit/Update/Cancel, and Item Command events, which can be handled at the page level by wiring event handlers to the DataLists Command events. DataList supports a SelectedItemTemplate and EditItemTemplate for control over the rendering of a selected or editable item. Controls can be programmatically retrieved from a template using the Control.FindControl method. This should be called on a DataListItem retrieved from the DataLists Items collection.外文文献译文ASP.NET是什么?ASP.NET是一个能在规划好框架的服务器上建造强大的网络应用。ASP.NET提供几个重要的优于以前的网络发展模型之处:增强的性能。ASP.NET能在服务器上编译普通语言运行环境不象它的解释前人ASP.NET能利用早的结合、just-in-time编辑,本国的最佳化,贮藏箱的全然的服务。Unlike its interpreted predecessors, ASP.NET can take advantage of early binding, just-in-time compilation, native optimization, and caching services right out of the box.这数量对戏剧性地较好的性能在你曾写一排密码之前。世界第一流水平的工具支持。ASP.NET的骨架在在视力的电影制片厂整体的发展环境方面的个有钱的工具箱和设计者旁是与补体连结的。所见即所得编辑、drag-and-drop服务员控制和自动的使用是刚才一特征很少这个强大的工具提供。力和柔性。因为ASP.NET运行时间以普通的语言为基础,完全的台是对网应用启发者有用的力和柔性。净的骨架类图书馆,通知,数据通道解法从网全部是无缝地可以接近的。ASP.NET也是语言独立的,因此你能选择语言最好地适用于你的应用或横过许多语言瓜分你的应用。更多地,普通的语言运行时间相互操作性保证你的现存的对根据COM发展的投资当到ASP.NET移时保存。简单性。ASP.NET使从对使用和地点外形的简单的形式屈服于和顾客证实做普通的任务是容易的。例如,ASP.NET的页骨架允许你建造使用者界面从表演密码的干净分离的应用逻辑并触摸事件在一简单的,可视化Basic如同形式处理模型。另外,普通的语言运行时间简化发展,同管理密码服务像自动的提及计算和垃圾收集。可管理性。ASP.NET雇用一个根据正文、hierarchical外形系统,这简化应用对你的服务员环境和网应用安置。因为外形消息是作为清楚的正文贮藏,新的安置可能没有地方的管理工具的帮助被适用。这零地方的管理哲学延长到展开ASP.NET。同样的净的骨架应用。一ASP.NET的骨架应用是以对服务员复制必要的文件对一个服务员简单地展开。无服务员再起动被需要,甚至展开或替换跑编辑了密码。可量测性和可得到。ASP.NET在头脑方面已经设计成有可量测性,有明确地简单明了的特征改进在成群方面的性能和多处理机环境。更多地,是紧密地的过程被小毒蛇监视了并管理。净的运行时间,结果如果某人行为不端(漏僵持),一个新的过程能在帮助保留经常地可得到的你的应用触摸需要的它的地方创造了。 Customizability和伸长率。ASP.NET送一个很好因素建筑那允许启发者向他们的在适当的平面之处的密码。事实上,延长或替换ASP.NET的任何亚成分是可能的。有你的自己的习惯写成分的净的运行时间。实现定做的证实或国家的服务从未是更容易的。安全。同在窗证实和per-application外形里建造,你能被保证你的应用是安全的。捆概观和句法ASP.NET的数据。网介绍一个捆句法的新的宣言的数据。这极端弹性的句法许可启发者不仅仅到数据源捆,也对简单的属性,收集、表示甚至结果从方法呼叫返回了。接着的桌子展示一些新的句法的实例。虽然这种句法显得类似于ASP.NET为答复的shortcut的。写- -它的行为是完全不同的。而ASP.NET答复。写shortcut句法当页加工了,ASP.NET时估计。捆句法的净的数据当DataBind方法祈祷时仅仅估计。DataBind是一个页和所有的服务员控制的方法。当你呼唤在一次父母控制上的DataBind时,它到所有的控制的孩子成瀑布落下。如此,例如,DataList1。DataBind()在DataList样板里在各控制上祈祷DataBind方法。关于页-页的呼叫DataBind。DataBind()或简单地DataBind()-引起捆关于页表示估计的所有的数据。DataBind是普通从Page_Load事件,如所示在接着的实例方面呼唤了。你能使用几乎在任何地方次结合表示在宣言的部分一。aspx页提供了它对期望的数据在跑时间的类型估计。简单的财产,表示和方法实例高于表演正文对使用者当估计时。在这些情况方面,捆表示的数据必须对一个类型绳的价值估计。在收集实例方面,捆表示的数据对为ListBox的DataSource财产的个有效的类型的价值估计。你可能发现强迫在你的结合表示里的价值的类型生产愿望结果是必要的。例如,如果计算是一个整数:记录的数:对简单的属性捆ASP.NET。捆句法的净的数据支持,对公众的变量、页的属性和关于页的别的控制的属性捆。接着的实例说明对关于页的个公众的变量和简单的财产捆。注意这些价值在DataBind()以前起始了呼唤。接着的实例说明对一个另一控制的财产捆。对如同DataGrid、ListBox和HTMLSelect收集和目录目录服务员控制捆作为一个数据源使用一收集。接着的实例说明对通常的普通的语言运行时间收集类型捆。这些控制能仅仅捆向收集那支持IEnumerable、ICollection或IListSource界面。普通最多的,你将对ArrayList、Hashtable、DataView和DataReader捆。接着的实例说明对一个ArrayList捆。接着的实例说明对一个DataView捆。注意DataView类在系统方面给其定义。数据namespace。接着的实例说明对一个Hashtable捆。经常捆表示或方法,你在对你的页或一次控制捆以前将想要操作数据。接着的实例说明对一次表示和一个方法的返回价值捆。DataBinder。EvalASP.NET供给一个静的方法那估计迟的捆数据捆表示和随意地版式象一条绳一样的结果。DataBinder。Eval是方便的在那它投启发者的明白的更非常除去对愿望数据类型必须强迫价值。当数据捆在一
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年福建省龙岩市新罗区国有资产经营集团有限公司招聘1人模拟试卷及答案详解(夺冠系列)
- 2025福建厦门启航培训服务有限公司招聘1人模拟试卷及参考答案详解1套
- 2025年蚌埠固镇县连城镇招聘村级后备人才3人考前自测高频考点模拟试题及答案详解参考
- 2025江苏徐州医科大学招聘专职辅导员4人考前自测高频考点模拟试题附答案详解(模拟题)
- 2025年福建省福州第十八中学招聘1人考前自测高频考点模拟试题及答案详解1套
- 2025辽宁能源控股集团所属抚矿集团拟聘人员补录考前自测高频考点模拟试题附答案详解(典型题)
- 2025春季新疆石河子大学第一附属医院、石河子大学附属中医医院(兵团中医医院)校园招聘10人模拟试卷及答案详解(网校专用)
- 2025河南新乡市延津县县外在编在岗教师回乡任教的考前自测高频考点模拟试题及答案详解1套
- 2025广东广佛产业园区运营管理有限公司招聘考前自测高频考点模拟试题及答案详解1套
- 2025年合肥市第一人民医院双凤院区招聘31人考前自测高频考点模拟试题及1套参考答案详解
- 人教版九年级数学上册全册单元检测卷及答案(包含:期中、期末试卷)
- 少儿篮球培训家长会
- 儿童抑郁量表CDI使用与说明
- 售后服务方案及运维方案
- 人教版八年级上册历史复习提纲
- 深化新时代教育评价改革总体方案
- 结构生物学01章-结构生物学绪论(一)课件
- 25手术室护理实践指南
- 日语的拨音促音和长音
- 门诊质量控制指标
- YY/T 0661-2008外科植入物用聚(L-乳酸)树脂的标准规范
评论
0/150
提交评论