Load Web Control Library dynamically at runtime

Discussion in 'ASP .Net Web Controls' started by news.microsoft.com, Sep 3, 2005.

  1. Hi all,

    I've to do the following:

    1. Create a asp.net web control library.
    2. Create a asp.net server control (inside the library).
    3. Compiling the library (library.dll)


    now i created a asp.net web application project. i copied the library.dll in
    the bin directory of the web application.
    now i created a asp.net page. in the page_load method i need to load the
    control library (library.dll) *at runtime* and create a instance of the
    server control inside the library.
    important: i cannot create a "reference" to library.dll at design time!!!

    i know the method "LoadControl", but how can i use it this way?

    Thank you!

    Ingo
    news.microsoft.com, Sep 3, 2005
    #1
    1. Advertising

  2. news.microsoft.com

    Brock Allen Guest

    Are you using VS.NET? Is this reference for the code in the codebehind or
    the code in the ASPX itself? VS.NET 2003 or 2005?

    -Brock
    DevelopMentor
    http://staff.develop.com/ballen



    > Hi all,
    >
    > I've to do the following:
    >
    > 1. Create a asp.net web control library.
    > 2. Create a asp.net server control (inside the library).
    > 3. Compiling the library (library.dll)
    > now i created a asp.net web application project. i copied the
    > library.dll in
    > the bin directory of the web application.
    > now i created a asp.net page. in the page_load method i need to load
    > the
    > control library (library.dll) *at runtime* and create a instance of
    > the
    > server control inside the library.
    > important: i cannot create a "reference" to library.dll at design
    > time!!!
    > i know the method "LoadControl", but how can i use it this way?
    >
    > Thank you!
    >
    > Ingo
    >
    Brock Allen, Sep 4, 2005
    #2
    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. =?Utf-8?B?UmV6YSBOYWJp?=

    Load User Control Dynamically, Cast object dynamically

    =?Utf-8?B?UmV6YSBOYWJp?=, Mar 4, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    6,697
    Matt Berther
    Mar 5, 2005
  2. =?Utf-8?B?UmV6YSBOYWJp?=

    Load User Control Dynamically, Cast object dynamically

    =?Utf-8?B?UmV6YSBOYWJp?=, Mar 4, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    6,337
    Scott Allen
    Mar 4, 2005
  3. =?Utf-8?B?QXR1bCBCYWhs?=

    Not able to load web user control dynamically in ASP .Net 2.0

    =?Utf-8?B?QXR1bCBCYWhs?=, Aug 18, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    4,400
    =?Utf-8?B?QXR1bCBCYWhs?=
    Aug 22, 2005
  4. ShaunN

    Dynamically Load Control from Control Library

    ShaunN, Dec 4, 2003, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    209
    Cy Huckaba
    Dec 5, 2003
  5. TJ
    Replies:
    4
    Views:
    350
    Steven Cheng[MSFT]
    Apr 7, 2006
Loading...

Share This Page