A
Ash
I want to provide the ability for my users to login from any page that they
are on. ie. have a login user control with a username and password box on
each page (not a link to a login page).
However, as the values of other controls on the page , and whether these
controls are displayed, rely on whether the user is logged in, I need to get
the UserID before the controls are created.
I suppose that I could set these properties in the PreRender event of the
page, but how can I determine whether certain controls, or controls within
those controls, are created.
Because the server-side control events are fired after the
CreateChildControls method is invoked, I can see no way to access the UserID
unless I post the login request to a different page (not recommended,
passing passwords between pages), and then transfer back to the original
page. In this case, I would also need to preserve the Viewstate of the
original page (I'm not sure how: Session variable? Querystring?).
are on. ie. have a login user control with a username and password box on
each page (not a link to a login page).
However, as the values of other controls on the page , and whether these
controls are displayed, rely on whether the user is logged in, I need to get
the UserID before the controls are created.
I suppose that I could set these properties in the PreRender event of the
page, but how can I determine whether certain controls, or controls within
those controls, are created.
Because the server-side control events are fired after the
CreateChildControls method is invoked, I can see no way to access the UserID
unless I post the login request to a different page (not recommended,
passing passwords between pages), and then transfer back to the original
page. In this case, I would also need to preserve the Viewstate of the
original page (I'm not sure how: Session variable? Querystring?).