JQueryMobile and WebForm Response.Redirect

JQueryMobile and WebForm Response.Redirect

I'm a total newbie of JQueryMobile and I encountered this problem when redirecting to a page with multiple data-role="page". My page is structured like this

<div data-role="page">
<a href="#login"></a>...
</div>
<div data-role="page" id="login">
</div>

The first acts like a splash screen where when clicked it should go to #login. The form elements are in the login and my event for clicking the login button is something like

  1. if (ok) {
  2.       Response.Redirect("Dashboard.aspx");
    } else {
  3.       // Something's wrong, go to login and display error message
  4.       Response.Redirect("Default.aspx#login", true);
    }

This is C# btw and when there's an invalid login credentials, it still goes to the splash screen. The page with no ID, I expected it to be in the #login page data role.

I'm sure I'm missing something but I can't figure out what. Thanks and best regards.