Answer:
We can use two constructs to access page-level variables in an ASP.NET web template:
data binding syntax
Data binding—the hierarchical mapping of control properties to data container
values—is specified by the <%# … %> tags. Code located within a <%# … %>
code block is only executed when the DataBindmethod of its parent control
container is invoked.
code rendering syntax
The <%= … %> code tags output content to the browser. This content could
be hard-coded, or it may contain page-level variables.
Asked In: Many Interviews |
Alert Moderator