Question from beginner. Why code <%= System.DateTime.Now.ToLongDateString() %> is not executed in ASP.NET. Could anyone explain why it do not work?
<input class="input" name="url" id="url" type="text" runat="Server" style="width: 650px" onblur="this.value='<%= System.DateTime.Now.ToLongDateString() %>'" />
I believe it is because of
runat="server". Either you generate the “onblur” attribute in your code-behind code, or you remove the “runat” attribute.