Jump to content

Remember login


jteixeira

Recommended Posts

Hi I'am working with visual web developer in c# and when try debug the page appers this error:Property or indexer 'System.Web.UI.WebControls.Login.Password' cannot be assigned to -- it is read onlyin

Login1.Password=pass;

Link to comment
Share on other sites

You know, I've never used that Login control. What I typically do is to use two text boxes instead:

<asp:TextBox id="Username" runat="server" TextMode="SingleLine" /><asp:TextBox id="Password" runat="server" TextMode="Password" />

Then, if I already know the password and want to pre-populate that field (something I very rarely need to do, but...) I do something like this in the C#:

Password.TextMode = TextBoxMode.SingleLine;Password.Text = "somepassword";Password.TextMode = TextBoxMode.Password;

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...