473,397 Members | 1,974 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

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
1 1208
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: jason | last post by:
Access 2000 I would like to be able to generate table reports listing all the TABLE NAMES, FIELDS and their datatypes in a neatly formatted table. Additionally I am building up a frightening...
43
by: Steven T. Hatton | last post by:
Now that I have a better grasp of the scope and capabilities of the C++ Standard Library, I understand that products such as Qt actually provide much of the same functionality through their own...
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
19
by: Deniz Bahar | last post by:
Hi, I would like to call one of my functions the exact name as an existing C library function (for example K&R2 exercises asks me to make an atof function). If I don't include the header with...
2
by: nyhetsgrupper | last post by:
Hi, Are you using the Microsoft enterpise library? I am considdering using this in a new project. I am specialy interested in the Logging, database, and exception modules. Anyone having experience...
24
by: Earl | last post by:
I have all of my data operations in a separate library, so I'm looking for what might be termed "best practices" on a return type from those classes. For example, let's say I send an update from...
2
by: sabbadin12 | last post by:
Hi, I'm going to work on an application that uses a postgreSQL database so that it can uses SQLServer 2005. I think I solved most problems on the programming side, but I still have some doubts...
0
by: kirk | last post by:
I have three events that I have created and manage with timers. Two of the timer event handlers, the last two in the code below, need to reset state management data, if the first event handler...
17
by: henry | last post by:
Folks Here's a skeleton, generic HTML page, call it "index.php". You'll see a bit of php code in the middle: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.