source - http://stackoverflow.com/a/6847569
for instance this :
will print as is the <%= Now.ToShortDateString() %>
the solution is to set the text/value at page_load
for instance this :
JavaScript:
<asp:Label ID="lbl" runat="server" Text="<%= Now.ToShortDateString() %>" />
will print as is the <%= Now.ToShortDateString() %>
the solution is to set the text/value at page_load
JavaScript:
protected void Page_Load(object sender, EventArgs e)
{
lbl.Text = DateTime.Now.ToShortDateString();
}