jteixeira Posted May 3, 2007 Share Posted May 3, 2007 hi, I'am workin with visual web developer in c# and i want make a login page.It's work, but i want add a Checkbox to when checked save username and password. I don't know the code Link to comment Share on other sites More sharing options...
jesh Posted May 3, 2007 Share Posted May 3, 2007 If you have a checkbox: <asp:CheckBox ID="SaveUserCheckBox" runat="server" Text="Save User to Database?" /> You can get it's checked status in your code like this: if(SaveUserCheckBox.Checked){ // execute the code that saves the user}else{ // execute the code that doesn't save the user} Link to comment Share on other sites More sharing options...
jteixeira Posted May 4, 2007 Author Share Posted May 4, 2007 this save the username and the password? Link to comment Share on other sites More sharing options...
jteixeira Posted May 4, 2007 Author Share Posted May 4, 2007 <authorization> <deny users=?/> </authorization> why this dosen't work? Link to comment Share on other sites More sharing options...
aspnetguy Posted May 4, 2007 Share Posted May 4, 2007 start here http://www.ondotnet.com/pub/a/dotnet/2003/...ormsauthp1.htmlforms authentication is much different then simply setting cookies and sessions Link to comment Share on other sites More sharing options...
jteixeira Posted May 4, 2007 Author Share Posted May 4, 2007 when i put this in webconfig authentication mode="Forms"> <forms name=".COOKIEDEMO" loginUrl="~/Login/Login.aspx" protection="All" timeout="30" path="/"/> </authentication> <authorization> <deny users="?" /> </authorization> appears this error:This property cannot be set for anonymous users. in -> this.SetPropertyValue("Numero_Cliente", value); Link to comment Share on other sites More sharing options...
aspnetguy Posted May 4, 2007 Share Posted May 4, 2007 I have <authentication mode="Forms"> <forms name=".ASPXAUTH" loginUrl="login.aspx" /> </authentication> <authorization> <deny users="?" /> </authorization> and it works fine with no errors Link to comment Share on other sites More sharing options...
jteixeira Posted May 4, 2007 Author Share Posted May 4, 2007 dosen't work.i have this: <system.web> <authentication mode="Forms"> <forms name=".ASPXAUTH" loginUrl="login.aspx" /> </authentication> <authorization> <deny users="?" /> </authorization> <profile> <properties> <add name="Numero_Cliente" defaultValue="30"/> <add name="i" defaultValue="1"/> <add name="Facturas" defaultValue="0"/> <add name ="Obras" defaultValue ="0"/> <add name ="Print" defaultValue ="0"/> <add name ="Precos" defaultValue ="Selecione..."/> </properties> </profile> <pages> <controls> <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> </controls> </pages> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.