There can be scenarios in which you will have to make some modifications to the HTML code generated by ASP.Net engine just before it is sent to the browser.

Here is how you can do it.

Create a new ASP.Net WebForm. Add a label control and set the Text as [CurDateTime]. Following is the code.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CustomRender.aspx.cs" Inherits="CustomRender" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
 <title>Untitled Page</title>
</head>
<body>
 <form id="form1" runat="server">
 <div>
 <asp:Label ID="lblTest" runat="server" Text="[CurDateTime]"></asp:Label>
 </div>
 </form>
</body>
</html>

In the Code-behind file, override the Render() event and make the changes to the Html as required. Following is the code for the same.

protected override void Render(HtmlTextWriter writer)
 {
MemoryStream mStream = new MemoryStream();
 HtmlTextWriter htmlWriter = new HtmlTextWriter(new StreamWriter(mStream));

 base.Render(htmlWriter);
 htmlWriter.Flush();
 mStream.Position = 0;

 StreamReader reader = new StreamReader(mStream);
 string htmlDump = reader.ReadToEnd();
 reader.Close();
 htmlDump = htmlDump.Replace("[CurDateTime]", DateTime.Now.ToString());
 Response.Write(htmlDump);

 }

The code replaces the Text [CurDateTime] with the current date and time in the HTML and renders it in the browser.

This is just an example you can go ahead and do as many tweaks as you want..!