如标题

解决方案 »

  1.   

    自己重新给密码文本框赋值,要这样赋值:txtPassword.Attributes["value"] = "mypassword";
      

  2.   

    因为TextBox实现中的private bool SaveTextViewState
    {
        get
        {
            if (this.TextMode == TextBoxMode.Password)
            {
                return false;
            }
    //这里 return false TextBox 的SaveTextViewState熟悉被标识成了false 和 密码框一样 不保持你所说的 "状态" 了....
            if (((base.Events[EventTextChanged] == null) && base.IsEnabled) && ((this.Visible && !this.ReadOnly) && (base.GetType() == typeof(TextBox))))
            {
                return false;
            }
            return true;
        }
    }参考
    http://community.csdn.net/Expert/topic/5737/5737693.xml?temp=.2748834