Asp server Label: display server time (C#) : Server Time « Server « ASP.Net






Asp server Label: display server time (C#)

<%@ Page Language="C#" %>
<script runat="server">

    void Page_Load()
    {
      time.Text=DateTime.Now.ToString();
    }

</script>
<html>
<head>
</head>
<body>
    <form runat="server">
       In WebServerLand the time is currently:<asp:Label id="time" runat="server" /> 
    </form>
</body>
</html>

           
       








Related examples in the same category