-->
<asp:literal ID="Literal1" runat="server" Text="Welcome to Asp.net" />
<<%@ Page Language="C#" AutoEventWireup="true" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server"> protected void Page_Load(object sender, EventArgs e) { PageTitle.Text = DateTime.Now.ToString("M"); } </script> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title> <asp:Literal ID="PageTitle" runat="Server" /></title> </head> <body> <form id="form1" runat="server"> <div> <asp:Literal ID="Literal1" runat="server" Text="Welcome to Asp.net" ></asp:Literal> <h1> Look in the title bar</h1> </div> </form> </body> </html>
Thanks for reading Asp.Net Literal Control