ASP. NET 2.0 improves the Data Binding operation in the template. It simplifies the Data Binding syntax databinder. eval (container. dataitem, fieldname) in v1.x to eval (fieldname ). The eval method, like databinder. Eval, can accept an optional
Differences and usage of data formatting-eval ("") and databinder. eval (container. dataitem, "")
ASP. NET 2.0 improves the Data Binding operation in the template. It simplifies the Data Binding syntax databinder. eval (container. dataitem,
Code highlighting produced by Actipro Codehighlighter (freeware) http://www.codehighlighter.com/-->, first of all, a simple understanding .eval can execute a string generation statement, similar to the SQL exec (). What are the use cases for eval?
Eval () methodDuring runtime, reflection is used to perform post-binding computation. Therefore, compared with the standard ASP. NET data binding method bind, performance will be significantly reduced. It is generally used to format strings when
ASP. NET 2.0 improves the Data Binding operation in the template. It simplifies the Data Binding syntax databinder. eval (container. dataitem, fieldname) in v1.x to eval (fieldname ). The eval method, like databinder. Eval, can accept an optional
1. Bind isBidirectional data binding, Will change only when there is a data source.
2. In net1.x, there are databinder (container. dataitem, "data item ")One-way Data Binding
. Net2.x is simplified to eval ("data item ");
The difference
1. In JS, the eval () method converts the string format data into a date formatfunction GetDate (strdate) {//strdate is a string that needs to be converted to a date format var date = eval (' New date (' + Strdate.replace ') (/\d+ (? =-[^ -]+$)/,
Eval () methodLate-bound calculations are performed using reflection at run time, so performance is significantly reduced compared to the standard ASP. NET data binding method. It is typically used when binding requires formatting a string. Use this
In-depth analysis of the functions of JSON. parse (), JSON. stringify () and eval (), json. stringifyeval
"JSON (JavaScript Object Notation) is a lightweight data exchange format. It is based on a subset of ECMAScript. Because it adopts a
Eval () function, which can execute a string as a JavaScript expression. [Eval () function]
JavaScript has many tips to make programming easier.
One of them is the eval () function, which can execute a string as a JavaScript expression.
For example:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.