Hi,
Why Literal control is used? How to work with this control? Plz, explain with simple example.
Thanks.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Anuja PawarPosted Jan 10, 2012, 3:07 AM
Satyapriya NayakPosted Jan 6, 2012, 12:36 AM
The Literal control is used to display text on a page.
Example-1
Example-2
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public partial class _Default : System.Web.UI.Page
{
protected void submit(object sender, EventArgs e)
{
Literal1.Text = "What is the use of this control";
}
}
Thanks