|
Halo, this problem
<%# %> Bind the writing method, calculate the value when calling the DATABIND() method in the background, and use the value instead of the page to display HTML
<%= %> Run the code on the server side, calculate the value when parsing the page, display HTML, the same reason as the previous ASP server-side code
As can be seen from the above introduction, <%# %>, <%= %> are different concepts, they also run at different times, according to the life cycle of a page, first execute the background CS code, and then parse the ASPX page, you can Know that <%# %> runs before <%= %>
You can verify it with an example |
|