<%@Page debug="true"%> <script language="C#" runat="server" > DateTime theTime; protected void Page_Load(object o, EventArgs e) { theTime = DateTime.Now; Page.DataBind(); } </script> The time is: <%# theTime %><br/>