Use code behind to set value to asp:Literal ( : Literal « Controls « ASP.NET Tutorial

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="LiteralTime" %>

<html xmlns="" >
<head runat="server">
    <title>Untitled Page</title>
    <form id="form1" runat="server">
        <asp:literal runat="server" ID="currentTime"></asp:literal>

File: Default.aspx.vb

Partial Class LiteralTime
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        currentTime.Text = DateTime.Now
    End Sub
End Class

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 (