你所说的不实。害得我还写了个程序给你测试了一下:<%@ 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">    protected void Button1_Click(object sender, EventArgs e)
    {
        this.Button1.Text = "测试结果:" + this.TextBox1.Text;
        this.TextBox1.Enabled = false;
    }    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
            this.TextBox1.Text = "现在是"+ DateTime.Now.ToShortTimeString();
    }
</script><html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" /></div>
    </form>
</body>
</html>
自己反思一下,问题出在哪里?

解决方案 »

  1.   

    是的,
    asp.net2.0是这样的,具体原因和解决方法参见http://blog.csdn.net/net_lover/archive/2006/09/25/1282127.aspx
      

  2.   

    使用contentediteable 属性设置 似乎是这个名字 就可以实现只读效果并且不丢失值
      

  3.   

    asp.net1.X时没有这个问题
    asp.net2.0之后就有这个问题了。
      

  4.   

    这个倒不清楚,不过建议楼主可以用Label控件做