Compiling Webcontrols on the fly

Discussion in 'ASP .Net Web Controls' started by Arne, Jan 7, 2005.

  1. Arne

    Arne Guest

    I can create a webcontrol dynamically and add it to a placeholder.
    Dim box as TextBox = new TextBox()
    placeholder1.controls.add(box)
    But then I will not get any viewstate.
    I have seen programs that create webcontrols at runtime and then compiles
    them into the GAC. I don't remember how.
    Can anyone tell me how?
     
    Arne, Jan 7, 2005
    #1
    1. Advertising

  2. Arne

    Saravana Guest

    Check out this article to know how to retain state for dynamically created
    controls in asp.net
    http://www.codeproject.com/aspnet/retainingstate.asp

    --
    -Saravana
    http://dotnetjunkies.com/WebLog/saravana/
    www.ExtremeExperts.com



    "Arne" <> wrote in message
    news:...
    > I can create a webcontrol dynamically and add it to a placeholder.
    > Dim box as TextBox = new TextBox()
    > placeholder1.controls.add(box)
    > But then I will not get any viewstate.
    > I have seen programs that create webcontrols at runtime and then compiles
    > them into the GAC. I don't remember how.
    > Can anyone tell me how?
     
    Saravana, Jan 10, 2005
    #2
    1. Advertising

  3. Arne

    Arne Guest

    Saravana,
    I wonder if they would come up with something better for ASP.net 2.0
    Arne

    "Saravana" wrote:

    > Check out this article to know how to retain state for dynamically created
    > controls in asp.net
    > http://www.codeproject.com/aspnet/retainingstate.asp
    >
    > --
    > -Saravana
    > http://dotnetjunkies.com/WebLog/saravana/
    > www.ExtremeExperts.com
    >
    >
    >
    > "Arne" <> wrote in message
    > news:...
    > > I can create a webcontrol dynamically and add it to a placeholder.
    > > Dim box as TextBox = new TextBox()
    > > placeholder1.controls.add(box)
    > > But then I will not get any viewstate.
    > > I have seen programs that create webcontrols at runtime and then compiles
    > > them into the GAC. I don't remember how.
    > > Can anyone tell me how?

    >
    >
    >
     
    Arne, Jan 10, 2005
    #3
    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. Borse, Ganesh
    Replies:
    0
    Views:
    803
    Borse, Ganesh
    Nov 21, 2007
  2. Garrett Cooper
    Replies:
    0
    Views:
    566
    Garrett Cooper
    Feb 24, 2009
  3. Garrett Cooper
    Replies:
    0
    Views:
    504
    Garrett Cooper
    Feb 24, 2009
  4. Fabiano

    Creating webcontrols on the fly

    Fabiano, Apr 30, 2004, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    114
    Scott Mitchell [MVP]
    May 1, 2004
  5. Brian

    Fly outmenu on the fly

    Brian, Apr 8, 2005, in forum: Javascript
    Replies:
    0
    Views:
    118
    Brian
    Apr 8, 2005
Loading...

Share This Page