在VS里建2个radiobutton  和1个literal控件  
tml代码如下
<html xmlns="http://www.w3.org/1999/xhtml">
<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
        Literal1.Text = "测试控件的<b>文本</b>显示方式";
        if (radioEncode.checked == true)
        {
            Literal1.Mode = Literal1mode.Encode; 
        }
        if (radioPassthrough.checked == true)
        {
            Literal1.Mode = Literal1mode.passthrough;
        }      
    }
</script>
<head  id="head1" runat="server"><head>
<body>
    <form id="form1" runat="server">
    <asp:RadioButton ID="radioEncode" runat="server" GroupName="Literalmode" Checked="true" Text="Encode" AutoPostBack="true" />
    <asp:RadioButton ID="radioPassthrough" runat="server" GroupName="literalmode" Text="passthrough" AutoPostBack="true" />
    <p><asp:Literal ID="Literal1" runat="server"></asp:Literal>&nbsp;</p>
</form></body></html>