How do I get the input from a user web cotnrol and build the control based on that?

Discussion in 'ASP .Net Web Controls' started by Alex Stevens, Oct 20, 2004.

  1. Alex Stevens

    Alex Stevens Guest

    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
     
    Alex Stevens, Oct 20, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ABC
    Replies:
    1
    Views:
    2,644
    Larry
    Oct 4, 2005
  2. Christofer Dutz
    Replies:
    3
    Views:
    490
    Christofer Dutz
    Dec 9, 2003
  3. Replies:
    4
    Views:
    671
    Walter Roberson
    Sep 9, 2005
  4. Alex Stevens
    Replies:
    1
    Views:
    105
    Victor Garcia Aprea [MVP]
    Oct 23, 2004
  5. SPEAKIT

    Get image based on user input

    SPEAKIT, Sep 25, 2004, in forum: Javascript
    Replies:
    4
    Views:
    100
    Robert
    Sep 29, 2004
Loading...

Share This Page