two seperate ASP.net Web apps to share one ascx file

Discussion in 'ASP .Net' started by Eric, Jun 1, 2004.

  1. Eric

    Eric Guest

    I have a header server(.ascx) control that I want to use with all my
    existing seperate web apps. These web apps are configured as seperate
    web apps in IIS but when I try to build my solutiuon referencing an
    ..ascx that lives outside the application I get a failure.

    Is there any way to have a global ascx file that multiple seperate
    applications can use?

    Thanks

    Eric
    Eric, Jun 1, 2004
    #1
    1. Advertising

  2. There is no supported way to share a user control between projects, although
    there is a hack or two around that I've heard about.
    The easiest way is to just copy the ASCX and paste it into your other
    application.
    The "right" way to create a control that is easily reusable across multiple
    projects is to create a custom control instead of a user control.
    Here's more info:
    http://msdn.microsoft.com/library/d...l/vbconWebUserControlsVsCustomWebControls.asp

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://Steve.Orr.net



    "Eric" <> wrote in message
    news:...
    > I have a header server(.ascx) control that I want to use with all my
    > existing seperate web apps. These web apps are configured as seperate
    > web apps in IIS but when I try to build my solutiuon referencing an
    > .ascx that lives outside the application I get a failure.
    >
    > Is there any way to have a global ascx file that multiple seperate
    > applications can use?
    >
    > Thanks
    >
    > Eric
    Steve C. Orr [MVP, MCSD], Jun 1, 2004
    #2
    1. Advertising

  3. Eric

    Patrice Guest

    You could :
    - copy the ASCX file
    - or you could create a virtual directory that points tot the location of
    this user control

    Generally a user control contains code that is particulart to an app. A
    server control is more suitable for use in a whole range of applications...

    Patrice

    "Eric" <> a écrit dans le message de
    news:...
    > I have a header server(.ascx) control that I want to use with all my
    > existing seperate web apps. These web apps are configured as seperate
    > web apps in IIS but when I try to build my solutiuon referencing an
    > .ascx that lives outside the application I get a failure.
    >
    > Is there any way to have a global ascx file that multiple seperate
    > applications can use?
    >
    > Thanks
    >
    > Eric
    Patrice, Jun 1, 2004
    #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. Eric
    Replies:
    0
    Views:
    1,353
  2. Jheitmuller
    Replies:
    1
    Views:
    452
  3. Raffael Vogler
    Replies:
    2
    Views:
    341
    Raffael Vogler
    Dec 18, 2003
  4. moondaddy
    Replies:
    2
    Views:
    576
    Steven Cheng[MSFT]
    Oct 16, 2006
  5. Saraswati lakki
    Replies:
    0
    Views:
    1,317
    Saraswati lakki
    Jan 6, 2012
Loading...

Share This Page