Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Re: One solution containing multiple projects and multiple hosts (http://www.velocityreviews.com/forums/t58063-re-one-solution-containing-multiple-projects-and-multiple-hosts.html)

Stephen Miller 06-24-2003 12:55 PM

Re: One solution containing multiple projects and multiple hosts
 
Can anyone help?

jsausten@hotmail.com (Stephen Miller) wrote in message news:<cdb404de.0306160645.428f9f46@posting.google. com>...
> 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



All times are GMT. The time now is 06:51 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.