Hi All,
I'm creating a webapp (Using C#/ASP.net) and when I setup the login page, Chrome saves the password. The problem is that the password is not tied to a user name. I don't know how to explain it, but here's the scenario:
1- There're 2 text boxes and a submit button. The first button test is "Email Address". The second one is the password text box.
2- You type something in the 1st one: (e.g. John). Password: Doe. and hit submit.
3- Chrome asks: Do you want to save the password? Say yes...
4- Submit button directs you to another page. Now, try to return back to the same page (Click back for example).
5- You will see the login box is empty, but the password is not!!!
WHY? WHY? (I'm losing my mind of course.) Anyways, I tried to set the value to blank. It doesn't work!
I attached the code if you are interested.
Here is the aspx page and code below it:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="test._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="example1" runat="server" Text="Email Address"></asp:TextBox>
<asp:TextBox ID="example2" runat="server" Text="Email Address" TextMode="Password"></asp:TextBox>
<asp:Button ID="example3" runat="server" Text="Click me" OnClick="example3_Click" />
</div>
</form>
</body>
</html>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace test
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void example3_Click(object sender, EventArgs e)
{
FormsAuthentication.SetAuthCookie(example1.Text, false);
Response.Redirect("Webform1.aspx");
}
}
}


LinkBack URL
About LinkBacks



Reply With Quote

