Hello
I'm working on a asp.net 2.0 website that uses forms authentication. In the login.aspx there is the following code that takes you to default.aspx
Once in default.aspx, through a menu control (that is on a master page) you can navigate to, let's say, page B. If I log out from page B and log back in, then i'm taken to page B directly and not to default.aspx.
Can you explain this behavior?
Thanks
I'm working on a asp.net 2.0 website that uses forms authentication. In the login.aspx there is the following code that takes you to default.aspx
Code:
<asp:Login ID="Login1" runat="server" RememberMeSet="false" LoginButtonType="Link" TitleText="Login to the Ethic referal page" CssClass="dropShadowPanel" Width="100%">
<LayoutTemplate>
<table border="0" cellpadding="1" cellspacing="0" style="border-collapse: collapse">
<tr>
<td>
<table>
<tr><td colspan="3" style="height: 30px"> </td></tr>
<tr>
<td align="right" style="padding-left: 60px;">User Name: </td>
<td><asp:TextBox ID="UserName" runat="server" Width="200px" MaxLength="50"></asp:TextBox> <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
ErrorMessage="*" ToolTip="User Name is required." ValidationGroup="Login1" Font-Size="Medium"></asp:RequiredFieldValidator></td>
<td> (your email)</td>
</tr>
<tr>
<td> </td>
<td colspan="2"><asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="Username is not in the correct format." ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="Login1" ControlToValidate="UserName"></asp:RegularExpressionValidator></td>
</tr>
<tr>
<td align="right">
<asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password: </asp:Label></td>
<td colspan="2">
<asp:TextBox ID="Password" runat="server" width="200" TextMode="Password" MaxLength="50"></asp:TextBox>
<asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
ErrorMessage="*" ToolTip="Password is required." ValidationGroup="Login1" Font-Size="Medium"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="center" colspan="3" style="color: red">
<asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
</td>
</tr>
<tr>
<td> </td>
<td align="right"><asp:CheckBox ID="RememberMe" runat="server" TextAlign="Left" Text="Remember me next time?" /></td>
</tr>
<tr height="25px">
<td align="right" colspan="2">
<div style="height: 15px; margin-right: 5px; width: 70px; background-color: #4168b3; vertical-align: middle; text-align: center; font: bold 11px Arial;">
<asp:LinkButton ForeColor="#ccd7e9" ID="LoginLinkButton" runat="server" CommandName="Login" ValidationGroup="Login1">Log In</asp:LinkButton>
</div>
</td>
</tr>
<tr>
<td colspan="3" style="text-align: center;">
If you have not registered click
<asp:LinkButton id="lbRegister" Font-Underline="true" runat="server" CausesValidation="false" OnClick="lbRegister_Click">here</asp:LinkButton>
to sign up.
</td>
</tr>
<tr><td> </td></tr>
<tr>
<td colspan="3" style="text-align: center;">
<a onclick="javascript:window.open('ResetPassword.aspx',null, 'height=180,width=400,status=yes,toolbar=no,menubar=no,location=no');" target="_blank" style="text-decoration: underline; cursor:hand">Forgot your password?</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</LayoutTemplate>
</asp:Login>
Once in default.aspx, through a menu control (that is on a master page) you can navigate to, let's say, page B. If I log out from page B and log back in, then i'm taken to page B directly and not to default.aspx.
Can you explain this behavior?
Thanks