Literal Control : Literal « ASP.net Controls « ASP.NET Tutorial






The Literal control is similar to the Label control. 
However, unlike the Label control, the Literal control does not render its content inside of a <span> tag.

<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
    void Page_Load()
    {
        ltlTitle.Text = DateTime.Now.ToString("D");
    }
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title><asp:Literal id="ltlTitle" Runat="Server" /></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <h1>Look in the title bar</h1>

    </div>
    </form>
</body>
</html>








3.2.Literal
3.2.1.asp:Literal
3.2.2.Literal Control
3.2.3.The Mode property of Literal control
3.2.4.Use code behind to set value to asp:Literal (VB.net)