Hi!
Im trying to setup a login functionallity in C#, where I have a form on default.aspx that posts to Login.aspx where the logic is runned.
But when the form posts to Login.aspx I get a MAC viewstate verification error. What is this and why?
When I call Login.aspx direct from the browser I get no error, only when the form posts itself to it.
Default.aspx form code:
<form id="form1" runat="server" method="post" action="Login.aspx">
<div>
<input type="text" name="lgn" id="lgn" runat="server" /> Login<br />
<input type="password" name="pwd" id="pwd" runat="server" /> Password<br /><br />
<input type="submit" name="submit" id="submit" value="Login" runat="server" />
</div>
</form>
Is there any restrictions to posting a form to another page in the same project, or is there anny setting i have missed?
Thanks in advance
I solved it by using the PostBackURL property on a asp:button instead of the action property on the form tagg, like so:
<asp:Button id="btnSubmit" runat="server" text="login" PostBackUrl="~/Login.aspx" />