i am making a asp.net website where an user can change password .. by clicking a button changepassword i am redirecting to a new asp page where i have a user code field and a old password filed and a new password field like this:
<table width="100%">
<tr>
<td>
<asp:Label ID="Label5" runat="server" Text="User Code: "></asp:Label>
</td>
<td>
<asp:TextBox ID="txtusercd2" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label6" runat="server" Text="Enter Old Password: "></asp:Label>
</td>
<td>
<asp:TextBox ID="txtoldpwd" runat="server" TextMode="Password"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label7" runat="server" Text="Enter New Password: "></asp:Label>
</td>
<td>
<asp:TextBox ID="txtnewpwd" runat="server" TextMode="Password"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label8" runat="server" Text="Re-Enter New Password: "></asp:Label>
</td>
<td>
<asp:TextBox ID="txtrepwd" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="lblmsg2" runat="server" Text="Label"></asp:Label>
</td>
</tr>
<tr>
<td style="float:right">
<asp:ImageButton ID="btnchngpwd" runat="server" ImageUrl="~/images/Save.png" />
</td>
</tr>
</table>
now the problem is when i am redirecting to that page my code filed and old password is getting populated by the user login details
i dont want to populate the old password filed . what shold i do?
That’s the webbrowser auto-populating it for you. Add the
autocomplete="off"attribute to each<input />element that is being inappropriately filled.