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

J

JohnH.

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.AppSettings.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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,602
Members
45,182
Latest member
BettinaPol

Latest Threads

Top