zoukankan      html  css  js  c++  java
  • How to specify a value to password , PasswordBox Control

    How to save textbox viewstate that modetype is password, Show password

    <asp:TextBox runat="server" ID="txtPassword" TextMode="Password" Value='<%#Eval("Password") %>'></asp:TextBox>

    Or

    txtPassword.Attributes.Add("Value", password);

    See  AddAttributesToRender method you can find the answer. because the control is check modetype if modetype is password
    that don't add the Attribute.

    如何让asp.net 密码框****不会消失掉。

    使用Reflector 我们可以看到它的控件会判断 Mode是不是password是的话就不把值写进来了

    我们可以自己绕过这一层用txtPassword.Attributes.Add("Value", password);这样就可以把password写进来.

    也可以自己弄一个小控件

    以下就是PasswordBox的代码

    Code

    原文地址:http://www.cnblogs.com/lovebanyi/archive/2008/10/29/1322151.html

  • 相关阅读:
    LeetCode 977 有序数组的平方
    LeetCode 24 两两交换链表中的节点
    LeetCode 416 分割等和子集
    LeetCode 142 环形链表II
    LeetCode 106 从中序与后序遍历序列构造二叉树
    LeetCode 637 二叉树的层平均值
    LeetCode 117 填充每个节点的下一个右侧节点
    LeetCode 75 颜色分类
    redhat 7.4 挂载ntfs格式的u盘并且使用
    redhat 查看CPU frequency scaling(CPU频率缩放)
  • 原文地址:https://www.cnblogs.com/lovebanyi/p/1322151.html
Copyright © 2011-2022 走看看