I'm currently developing a website which requires customers to login to be able to view certain documents.
My login form is on my master page, and I have a content page which displays a list of documents. If a document is to be viewed by customers only, then the link is disabled until the customer logs in.
The problem I've had is that, because the content page loads before the master, when the customer first logs in the content page isn't updated, so doesn't realise that the customer is now logged in and so the link remains disabled. If I then refresh the page by hitting F5, the link becomes enabled.
I've finally managed to get around this by putting Server.Transfer(Request.ServerVariables["script_name"]) after logging the customer in. However, this then loses any previous postback data, so if I've drilled through a load of categories, I get shoved back to the top-level category.
Is there another way in which I can get the content page to realise that a customer is logged in without having to manually refresh the page, ie. by forcing it to reload with previous form submissions intact?
My login form is on my master page, and I have a content page which displays a list of documents. If a document is to be viewed by customers only, then the link is disabled until the customer logs in.
The problem I've had is that, because the content page loads before the master, when the customer first logs in the content page isn't updated, so doesn't realise that the customer is now logged in and so the link remains disabled. If I then refresh the page by hitting F5, the link becomes enabled.
I've finally managed to get around this by putting Server.Transfer(Request.ServerVariables["script_name"]) after logging the customer in. However, this then loses any previous postback data, so if I've drilled through a load of categories, I get shoved back to the top-level category.
Is there another way in which I can get the content page to realise that a customer is logged in without having to manually refresh the page, ie. by forcing it to reload with previous form submissions intact?