Programmatically Assigning CreateUserStep.ContentTemplate

Discussion in 'ASP .Net Web Controls' started by terry.aney@charter.net, Apr 25, 2007.

  1. Guest

    I am building a compiled control (so that a dll can simply be
    referenced) to build our CreateUser control. Since I am in a library
    dll, I can't use HTML to generate markup for the template. I've got
    code in *my control* to do the following:

    CreateUserWizard register = new CreateUserWizard();
    register.RequireEmail = false;
    register.CreatedUser += new EventHandler( register_CreatedUser );
    register.CreateUserError += new
    CreateUserErrorEventHandler( register_CreateUserError );
    register.CreatingUser += new
    LoginCancelEventHandler( register_CreatingUser );
    register.CreateUserStep.ContentTemplate = new
    CompiledTemplateBuilder( new
    BuildTemplateMethod( register_CreateUserStep_ContentTemplate ) );
    view.Controls.Add( register ); // A view in a MultiView control

    void register_CreateUserStep_ContentTemplate( Control container )
    {
    // Several container.Controls.Add() member calls
    }

    Unfortunately, my BuildTemplateMethod never gets called. Is it not
    possible to generate a CreateUserWizard UI from compiled code?

    Note that the following for a Login control worked fine:

    Login login = new Login();
    login.LoggedIn += new EventHandler( login_LoggedIn );
    login.LoginError += new EventHandler( login_LoginError );
    login.LoggingIn += new LoginCancelEventHandler( login_LoggingIn );
    login.LayoutTemplate = new CompiledTemplateBuilder( new
    BuildTemplateMethod( login_LayoutTemplate ) );
    view.Controls.Add( login );

    Thanks in advance.
     
    , Apr 25, 2007
    #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. JM_newsgroups
    Replies:
    1
    Views:
    620
    JM_newsgroups
    Feb 28, 2008
  2. JM_newsgroups
    Replies:
    0
    Views:
    386
    JM_newsgroups
    Feb 27, 2008
  3. Steve P

    assigning itemtemplate, edititemtemplate programmatically

    Steve P, Mar 28, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    3
    Views:
    218
    Steve
    Mar 30, 2005
  4. JJ
    Replies:
    0
    Views:
    141
  5. weston
    Replies:
    1
    Views:
    274
    Richard Cornford
    Sep 22, 2006
Loading...

Share This Page