Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between <% %> and <%= %> in ASP.NET MVC [duplicate]

Possible Duplicates:
What is the difference between <% %> and <%=%>?
C# MVC: What is the difference between <%# and <%=

I'm so confused with this.

Please explain the difference between this if possible..

What is the significance of that "=" there?

Edit:Thanks for all your answers.Please understand that It was hard to get any results by searching for "<%=" on google and on the search bar in stackoverflow as well.

like image 313
Josh Avatar asked Sep 08 '09 12:09

Josh


1 Answers

<% %> is a generic code block.

<%= expression %> is equivalent to <% Response.Write(expression); %>.

like image 86
mmx Avatar answered Oct 15 '22 20:10

mmx