If you want to display the current date on the page, you can do one of the following to write the date to the document. In the first example using <% %> you need to explicitly use Response.Write .
<% Response.Write(DateTime.Now.ToString()) %>
and in the following there is no need to explicitly write Response.Write
<%= DateTime.Now.ToString() %>
source share