[2.0] creating a back control

L

Lloyd Dupont

I'm trying to create a 'back' link
basically it's displayed only on the 'login' page, where (to test) I've put
all the
asp:login, asp:loginview, asp:CreateUserWizard, etc.. control.

in my Back link, in the OnInit I have written (for my 1st atempt)
if(!Page.IsPostBack)
{
ViewSate["url"] = backurl;
}

the problem is, when the user click the login button (of the login control),
the page, somehow, get constructed twice, and the second time
Page.IsPostback is false.
So I tryed something like that:

if(ViewState["url"] == null)
{
ViewState["url"] = backurl;
}
but, for some reason, ViewState["url"] is null on the second build....

why is there 2 build of the page? and why the viewstate get dismissed? and
what can I do?

thanks.....
 
L

Lloyd Dupont

what if the user clicks: refresh
I want to keep my back url... how do I do that?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top