Hi,
I am trying to bind data from database and display on the gridview, but want to display password as asterisk. I tried so many ways but can;t get it. Please help
<aspataList ID="myList" runat="server">
<ItemTemplate>
<td valign="top">
<table border="0" cellpadding="0" cellspacing="0" style="border-top:0">
<tr>
<td align="right" class="black8" > E-Mail Address:
</td>
<td align="left" class="black8">
<asp:TextBox ID="txtEmailAddr" runat="server" Wrap="true" MaxLength="50" Width="130" Text='<%#DataBinder.Eval(Container.DataItem,"USER_ID") %>' />
<asp:RequiredFieldValidator ID="rfvUserEmail" runat="server" ControlToValidate="txtEmailAddr" ErrorMessage="*"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="rfvUserEmailValidate" runat="server" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ControlToValidate="txtEmailAddr" ErrorMessage="Invalid Format"></asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td align="right" class="black8" >
Password*:
</td>
<td align="left">
<asp:TextBox ID="txtPassword1" MaxLength="8" Width="130" Enabled="true" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"PASSWORD") %>' />
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" display="dynamic" ControlToValidate="txtPassword1" ErrorMessage="Must be 8 characters." ValidationExpression="[^\s]{8,15}" />
</td>
</tr>
<tr>
<td align="right" class="black8" >Verify Password*:
</td>
<td align="left" >
<asp:TextBox ID="txtPassword2" TextMode="Password" MaxLength="15" Width="130" runat="server"></asp:TextBox>
<asp:CompareValidator ID="PassComp" ControlToCompare="txtPassword1" ControlToValidate="txtPassword2" runat="server" Display="Dynamic" ErrorMessage="Don't Match"/>
</td>
</tr>
I am trying to bind data from database and display on the gridview, but want to display password as asterisk. I tried so many ways but can;t get it. Please help
<aspataList ID="myList" runat="server">
<ItemTemplate>
<td valign="top">
<table border="0" cellpadding="0" cellspacing="0" style="border-top:0">
<tr>
<td align="right" class="black8" > E-Mail Address:
</td>
<td align="left" class="black8">
<asp:TextBox ID="txtEmailAddr" runat="server" Wrap="true" MaxLength="50" Width="130" Text='<%#DataBinder.Eval(Container.DataItem,"USER_ID") %>' />
<asp:RequiredFieldValidator ID="rfvUserEmail" runat="server" ControlToValidate="txtEmailAddr" ErrorMessage="*"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="rfvUserEmailValidate" runat="server" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ControlToValidate="txtEmailAddr" ErrorMessage="Invalid Format"></asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td align="right" class="black8" >
Password*:
</td>
<td align="left">
<asp:TextBox ID="txtPassword1" MaxLength="8" Width="130" Enabled="true" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"PASSWORD") %>' />
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" display="dynamic" ControlToValidate="txtPassword1" ErrorMessage="Must be 8 characters." ValidationExpression="[^\s]{8,15}" />
</td>
</tr>
<tr>
<td align="right" class="black8" >Verify Password*:
</td>
<td align="left" >
<asp:TextBox ID="txtPassword2" TextMode="Password" MaxLength="15" Width="130" runat="server"></asp:TextBox>
<asp:CompareValidator ID="PassComp" ControlToCompare="txtPassword1" ControlToValidate="txtPassword2" runat="server" Display="Dynamic" ErrorMessage="Don't Match"/>
</td>
</tr>