Valimai
asked on
asp Label id=Label1 runat=server Text="<% =DateTime.Now.ToString() %>"
Hi Experts
I come from an ASP background
How can I do this without writing in the code-behind or creating a function. i want to be able to do a response.write type thing.
<asp:Label id="Label1" runat="server" Text="<% =DateTime.Now.ToString() %>" />
thanks
I come from an ASP background
How can I do this without writing in the code-behind or creating a function. i want to be able to do a response.write type thing.
<asp:Label id="Label1" runat="server" Text="<% =DateTime.Now.ToString() %>" />
thanks
you can also try set the label's text at Page_Load event, like:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Label1.Text = DateTime.Now.ToString()
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Label1.Text = DateTime.Now.ToString()
End Sub
try
<asp:Label ID="Label1" Runat="server"><%=Date.Now %></asp:La bel>
<asp:Label ID="Label1" Runat="server"><%=Date.Now
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<code>date.now()</code>
</asp:Label>