473,765 Members | 2,134 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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\loo kup
\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="LibraryPag esBaseURL"
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.Http Application
{
public static string strLibPath =
System.Configur ation.Configura tionSettings.Ap pSettings.Get
("LibraryPagesB aseURL");
}
My applications then used Global.strLibPa th to reference pages in the
Lib directory.

Is there a more standard way to do this?

Thanks,
John

Nov 19 '05 #1
1 1218
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.ne t> 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\loo kup
\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="LibraryPag esBaseURL"
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.Http Application
{
public static string strLibPath =
System.Configur ation.Configura tionSettings.Ap pSettings.Get
("LibraryPagesB aseURL");
}
My applications then used Global.strLibPa th 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
1574
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 amount of queries.....I would also like to cycle through this and neatly associate notes with them to remind me of their specific purpose. The naming of the query can only go so far.
43
5018
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 libraries. I'm not sure if that's a good thing or not. AFAIK, most of Qt is compatable with the Standard Library. That is, QLT can interoperate with STL, and you can convert back and forth between std::string and Qt::QString, etc. Are there any...
136
9446
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 code was littered with document.all and eval, for example, and I wanted to create a practical list of best practices that they could easily put to use. The above URL is version 1.0 (draft) that resulted. IMO, it is not a replacement for the FAQ,...
19
2511
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 the declaration for the C library function (stdlib.h in this case) then define/declare my own function with the same name, am I safe? It seems to work on my compiler, but I wonder if this is portable or even acceptable? thx
2
1245
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 with this? It seems pretty nice, but I am concerned about the performance. I think the enterprise library seems pretty heavy, with everything configurable, but maybe I am completly wrong. It is designed by the practice and pattern group, so it...
24
2197
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 the UI layer to a method in a library class that calls the stored procedure. Best to return a boolean indicating success/failure, return a string with the exception message, or just return the entire exception?
2
2169
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 on the DB side regarding how to handle the creation of the db schema on sqlserver and how to handle the every day dba work. 1) should I try to use an ER tool like Embarcadero and have its logical model be the master copy ? (i did some tests, it...
0
1080
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 fires. My question, is what I have implemented the right way to design state management, or is there maybe a best practice to design this differently? private string szData1 = null; public string Data1 {
17
1914
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" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head>
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9398
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10156
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9832
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5419
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3924
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3531
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2805
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.