c# - ASP.NET <%# versus <% -
this question has answer here:
i'm working on various asp.net pages .
for inline functions see 2 different formats used:
example 1:
<p><%response.write(now())%></p>
i see 1 #:
example 2:
<asp:textbox id="textbox5" width="40" text='<%# databinder.eval(container.dataitem, "name") %>' runat="server" />
i want know exact different , <%# vs <%
here explanation here on stack -
in asp.net, difference between <%= , <%# [duplicate]
summary answers:
there several different 'bee-stings':
<%@
- page/control/import/register directive<%$
- resource access , expression building<%=
- explicit output page, equivalent<% response.write( ) %>
<%#
- data binding. can used databinding supported, or @ page level if callpage.databind()
in code-behind.<%--
- server-side comment block<%:
- equivalent<%=
, html-encodes output.
Comments
Post a Comment