I have a wizard with 3 steps:
2. user input form
3. summary and finish(submit)
As the user may already be logged in, I used the following code to skip step 1 on page load:
How about moving the login part of the operation outside of the wizard and making the wizard page require authentication via configuration?
This way, the wizard always consists of two steps and would only go to the login page if the user wasn't currently authenticated.
This is more or less what I have done as a workaround. I put the login into view1 of a multiview, and put the wizard with the remaining two steps into view2 of the multiview. Seems like a silly way to do it though.
That wasn't what I meant, but if it works...
Your suggestion would be a redirect to login.aspx if the user is not already logged in? I was just trying to use the login control on the actual page rather than a redirect. I suppose it doesn't really matter. Either way works.