Re: One solution containing multiple projects and multiple hosts

Discussion in 'ASP .Net' started by Stephen Miller, Jun 24, 2003.

  1. Can anyone help?

    (Stephen Miller) wrote in message news:<>...
    > I am trying to build one common application for several clients, that
    > shares a common code base. This is proving very difficult to set up.
    >
    > Say for example, I have two (or more) hosts, site1.mydomain.com &
    > site2.mydomain.com. Code is divided into presentation, business and
    > data layers. Only the presentation layer is unique amongst the two
    > hosts.
    >
    > I have created the following directory structure:
    >
    > \Common\DataLayer.vb
    > \Common\Login.aspx.vb
    > \Host1\Login.aspx
    > \Host2\Login.aspx
    >
    > The two Login.aspx pages differ only in layout (colours etc) and call
    > the same methods in the class Login.aspx.vp. At the top of both
    > login.aspx pages I have added:
    >
    > <%@ Page Language="vb" AutoEventWireup="false"
    > Codebehind="Login.aspx.vb" Inherits="Common.Login"%>
    >
    > In Solution Explorer my solution looks like:
    >
    > Solution 'myProject' (3 Projects)
    > [+] Common
    > |- DataLayer.vb
    > \- Login.aspx.vb
    > [+] Host1
    > \- Login.aspx
    > [+] Host2
    > \- Login.aspx
    >
    > My Login.aspx.vb file looks like:
    >
    > Imports System.Web
    > Imports System.Web.Security
    > Imports System.DateTime
    > Imports Common.DataLayer
    >
    > Public Class Login
    > Inherits System.Web.UI.Page
    > ...
    > End Class
    >
    > Now, my problem is that when I select 'view code' for either of the
    > two login.aspx files I get the following error message:
    >
    > "The class file for this Web Form was not loaded. Close the view,
    > correct any errors, then reopen the Web Form"
    >
    > How can I configure Visual Studio so that two projects can share the
    > same code-behind class for an aspx page?
    >
    > - Stephen
    Stephen Miller, Jun 24, 2003
    #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. Bla
    Replies:
    0
    Views:
    2,847
  2. Raterus

    Two Projects under one Solution?

    Raterus, Apr 15, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    563
    Rick Spiewak
    Apr 23, 2004
  3. Brian Shannon

    Two projects in one solution

    Brian Shannon, Aug 2, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    371
    Tom Dacon
    Aug 2, 2004
  4. Stefan Uhlemann

    Multiple projects in one solution - best way?

    Stefan Uhlemann, Dec 15, 2008, in forum: ASP .Net
    Replies:
    3
    Views:
    2,478
    Stefan Uhlemann
    Dec 15, 2008
  5. Bla
    Replies:
    1
    Views:
    198
    Tad McClellan
    Apr 10, 2005
Loading...

Share This Page