467,868 Members | 1,315 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,868 developers. It's quick & easy.

How to manage a library of web pages? (best practice?)

Hi,

Is there a better (best practice) way to do this?

I have developed a large set of ASP.NET applications in C#. Like
most applications I have a set of utility pages that can be called by
applications or directly by users. On my own I have developed a
technique to manage the application and lib directories, but it seems a
little awkward. I was wondering how other people handle this.
My Directory Organization:
--------------------------

wwwroot\app_dir_1
\app_dir_2
\app_dir_3

wwwroot\lib\lookup
\TimedPopup
\MessageBox
\...and so on...
My Web.config file:
--------------------

In the wwwroot directory I have created a Web.config file put the
following entry in it.

<appSettings>
<add key="LibraryPagesBaseURL"
value="http://127.0.0.1/Lib/"/>
</appSettings>
My Global.asax.cs file:
-----------------------

I have added the following code to each Global.asax.cs file.

public class Global : System.Web.HttpApplication
{
public static string strLibPath =
System.Configuration.ConfigurationSettings.AppSett ings.Get
("LibraryPagesBaseURL");
}
My applications then used Global.strLibPath to reference pages in the
Lib directory.

Is there a more standard way to do this?

Thanks,
John

Nov 19 '05 #1
  • viewed: 1080
Share:
1 Reply
Hi John:

I don't think there has been any best practices or easy methods put
forth to achieve what you need (share aspx across applications).
Server controls offer the best in modularity - if you can package your
functionality into one
(http://msdn.microsoft.com/library/de...mscontrol.asp).
The drawback is that they can be a little harder to develop.

--
Scott
http://www.OdeToCode.com/blogs/scott/
On 7 Apr 2005 11:49:23 -0700, "JohnH." <jo**@jrcc.net> wrote:
Hi,

Is there a better (best practice) way to do this?

I have developed a large set of ASP.NET applications in C#. Like
most applications I have a set of utility pages that can be called by
applications or directly by users. On my own I have developed a
technique to manage the application and lib directories, but it seems a
little awkward. I was wondering how other people handle this.
My Directory Organization:
--------------------------

wwwroot\app_dir_1
\app_dir_2
\app_dir_3

wwwroot\lib\lookup
\TimedPopup
\MessageBox
\...and so on...
My Web.config file:
--------------------

In the wwwroot directory I have created a Web.config file put the
following entry in it.

<appSettings>
<add key="LibraryPagesBaseURL"
value="http://127.0.0.1/Lib/"/>
</appSettings>
My Global.asax.cs file:
-----------------------

I have added the following code to each Global.asax.cs file.

public class Global : System.Web.HttpApplication
{
public static string strLibPath =
System.Configuration.ConfigurationSettings.AppSett ings.Get
("LibraryPagesBaseURL");
}
My applications then used Global.strLibPath to reference pages in the
Lib directory.

Is there a more standard way to do this?

Thanks,
John


Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

43 posts views Thread by Steven T. Hatton | last post: by
136 posts views Thread by Matt Kruse | last post: by
19 posts views Thread by Deniz Bahar | last post: by
2 posts views Thread by nyhetsgrupper | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.