PrepAway - Latest Free Exam Questions & Answers

Which of the following delimiters are used to create data binding expressions?

Which of the following delimiters are used to create data binding expressions?

PrepAway - Latest Free Exam Questions & Answers

A.
<%% and %>

B.
<%# and %>

C.
<%$ and %>

D.
<%& and %>

Explanation:
A data-binding expression creates bindings between a server control property and a data source
when the Page.DataBind method is called on a Web page. The expression can be included in the
opening tag of the server control. The following is the syntax of the data-binding expression:
<tagprefix:tagname property=”<%# data-binding expression %>” runat=”server” />
OR
Literal text <%# data-binding expression %>
Every data-binding expression is contained between <%# and %> characters. The expression uses the
following two methods:
Eval: The Eval method is a static or read-only method that takes a data field value and returns it as a
string. It is used as a property setting and references the bound data field to display data.
Bind: The Bind method supports read/write functionality to retrieve data-bound control values and
submit the changes made back to the database. It is used to reference the bound data field to insert,
edit, or delete data in the database or the data source.


Leave a Reply