A
Alex Stevens
Hi,
I'm building a user login control, which will accept a username and password
in textboxes and a checkbox to keep logged in - pretty much your
conventional login control.
When the user logs in, it writes a cookie to remember them, and if this
cookie exists when the control is run it just says, "Welcome back. - Click
here to logout"
It also has a hidden field, which indicates on postback the action the user
has selected, login / logout using an enum.
I've implemented INamingContainer, and IPostBackDataHandler to get the
information on postback.
The problem I have is that the control calls the CreateChildControls event
(in which I build the control in which ever form it should be) before it
calls the LoadPostData event.
This poses the problem that I can't build the control to look how it should
because I don't know what the action is until the LoadPostData event is run.
Interestingly, the order of the events changed once I implemented
INamingConatiner. Before I did that the LoadPostData event ran before the
CreateChildControls event???
So the question is, how do I dynamically build a control based on the
information retrieved in the LoadPostData event??
Thanks
Alex
I'm building a user login control, which will accept a username and password
in textboxes and a checkbox to keep logged in - pretty much your
conventional login control.
When the user logs in, it writes a cookie to remember them, and if this
cookie exists when the control is run it just says, "Welcome back. - Click
here to logout"
It also has a hidden field, which indicates on postback the action the user
has selected, login / logout using an enum.
I've implemented INamingContainer, and IPostBackDataHandler to get the
information on postback.
The problem I have is that the control calls the CreateChildControls event
(in which I build the control in which ever form it should be) before it
calls the LoadPostData event.
This poses the problem that I can't build the control to look how it should
because I don't know what the action is until the LoadPostData event is run.
Interestingly, the order of the events changed once I implemented
INamingConatiner. Before I did that the LoadPostData event ran before the
CreateChildControls event???
So the question is, how do I dynamically build a control based on the
information retrieved in the LoadPostData event??
Thanks
Alex