I am trying to do the following directly on an aspx page, but not showing the date value. I do not want to do this from code. Am I missing something here? Pls offers.
<asp:Literal ID="ltrDate" Text='<% DateTime.Now.ToLongTimeString() %>' runat="server"></asp:Literal>
Even using a hash in the expression <% # DateTime.Now.ToLongTimeString ()%> does not work.
source
share