前台: 

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>

<asp:TextBox ID="txtPwd" runat="server" CssClass="bian" TextMode="Password" Width="200px"></asp:TextBox>

 </ContentTemplate>
    </asp:UpdatePanel>

 

后台:

 protected override void OnPreRender(EventArgs args) 
{
    base.OnPreRender(args);
    txtPwd.Attributes["value"] = txtPwd.Text;
}

-------------------------------------------------------------------------------------

原因:将这个Textbox与其他的Textbox放在同一个UpdatePanel中了。这样互相有影响。

解决:把其单独放一个UpdatePanel中即可解决。

 

相关文章:

  • 2021-08-11
  • 2022-12-23
  • 2022-03-07
  • 2021-06-01
  • 2022-03-03
  • 2021-10-20
猜你喜欢
  • 2021-05-19
  • 2021-07-13
  • 2021-08-16
  • 2021-08-12
  • 2021-09-01
  • 2021-11-30
相关资源
相似解决方案