I have a Login control with an LoggedIn event that redirects the user based on their role.
The problem is the first time I log in it tries to redirect me to Default.aspx, which doesn't exist. But if I go back in the browser and log in again it redirects me to the appropriate page. Whats going on?!
protected void Button1_Click(object sender, EventArgs e)
// Validate the user against the Membership framework user store
if (Membership.ValidateUser(txt_Name.Text, txt_Password.Text))
// Log the user into the site
// user's credentials were invalid
lbl_InvalidMessage.Visible = true;
protected void OnLoggedIn(object sender, EventArgs e)
else if (User.IsInRole("Venue"))