Reputation: 852
I tried 2 methods for redirecting to an other page
<asp:HyperLink ID="asd" ViewStateMode="Disabled"
NavigateUrl="f2.aspx" runat="server" >HERE!</asp:HyperLink>
<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click"/>
and the code behind the button:
Response.Redirect("f2.aspx");
and for some reason - neither of them work! when i click them them i stay on the same page with a weird URL (see picture)
What did I do wrong??
Upvotes: 1
Views: 342
Reputation: 888047
You configured Forms Authentication in Web.config to require the user to be logged in.
Until the user is logged in, ASP.Net will redirect to the configured login page.
Upvotes: 3