Jump to content

Login Checkbox


jteixeira

Recommended Posts

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

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

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

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

Archived

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

×
×
  • Create New...