473,671 Members | 2,155 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Same aspx page/different folders

I have 2 aspx pages that are virtually identical, except for a few security
differences.

I have 2 folders, my non-secure folder and my secure folder.

There is one page in each. The one in the security folder checks to see if
you are logged on and allows you to do a couple of things the non-secure
does not. If the page is called in the non-secure area, it just works. If
the page in the Secure area is called, the Login page is automatically
called if a person is not logged on yet.

This works fine, for the most part.

The problem is that I find that as I make changes to one, I have to make
changes to the other and I find that I littler errors creep in as I try to
make the same changes, or changes get made in one that don't get made to
another.

I was wondering if there is a clean way to handle this or do you just have
to procedurally handle the 2 pages.

I thought about code-behind (as these pages are not), but you would still
have multiple files to deal with.

Thanks,

Tom
Nov 19 '05 #1
2 1424
You could put the common stuff in a user control, and put the user control
on both pages.

Here's more info:
http://SteveOrr.net/faq/UserCustom.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

"tshad" <ts**********@f tsolutions.com> wrote in message
news:ei******** ******@TK2MSFTN GP09.phx.gbl...
I have 2 aspx pages that are virtually identical, except for a few security
differences.

I have 2 folders, my non-secure folder and my secure folder.

There is one page in each. The one in the security folder checks to see
if you are logged on and allows you to do a couple of things the
non-secure does not. If the page is called in the non-secure area, it
just works. If the page in the Secure area is called, the Login page is
automatically called if a person is not logged on yet.

This works fine, for the most part.

The problem is that I find that as I make changes to one, I have to make
changes to the other and I find that I littler errors creep in as I try to
make the same changes, or changes get made in one that don't get made to
another.

I was wondering if there is a clean way to handle this or do you just have
to procedurally handle the 2 pages.

I thought about code-behind (as these pages are not), but you would still
have multiple files to deal with.

Thanks,

Tom

Nov 19 '05 #2
"Steve C. Orr [MVP, MCSD]" <St***@Orr.ne t> wrote in message
news:Oq******** ******@TK2MSFTN GP12.phx.gbl...
You could put the common stuff in a user control, and put the user control
on both pages.
I thought about that, but it really is the other way around.

Most of the page is the same.

I could put what is different in a custom control, but I still have the
problem of changes (new objects on the page, how the objects are handled,
etc).

Tom
Here's more info:
http://SteveOrr.net/faq/UserCustom.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

"tshad" <ts**********@f tsolutions.com> wrote in message
news:ei******** ******@TK2MSFTN GP09.phx.gbl...
I have 2 aspx pages that are virtually identical, except for a few
security differences.

I have 2 folders, my non-secure folder and my secure folder.

There is one page in each. The one in the security folder checks to see
if you are logged on and allows you to do a couple of things the
non-secure does not. If the page is called in the non-secure area, it
just works. If the page in the Secure area is called, the Login page is
automatically called if a person is not logged on yet.

This works fine, for the most part.

The problem is that I find that as I make changes to one, I have to make
changes to the other and I find that I littler errors creep in as I try
to make the same changes, or changes get made in one that don't get made
to another.

I was wondering if there is a clean way to handle this or do you just
have to procedurally handle the 2 pages.

I thought about code-behind (as these pages are not), but you would still
have multiple files to deal with.

Thanks,

Tom


Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1815
by: George Hester | last post by:
If I have 1 Virtual Dirctory with 2 different subfolders are these 2 different folders different virtual folders? Or if I have 2 different Virtual Directories each containing a subfolder are these two subfolders 2 different virtual folders? I know it seems like a weird question but I'm asking because Microsoft is using the term "virtual folders" and I am not sure if they mean the former or the later. Thanks. -- George Hester...
1
2948
by: Dan | last post by:
I have an asp.net page default.aspx with a user control and a placeholder control. <html> <body> <form id="myform" method="post" runat="server" /> <PageHeader:Header id="header1" runat="server" /> <asp:PlaceHolder ID="content" runat="server" /> </form> </body>
12
1210
by: Francois Soucy | last post by:
I've 2 projects in same WEbRoot. Each project has is own Subdirectory. Project #1: /Journal/ '<-- Anonymous /Journal/Admin/ ' <-- WebForm Authentication for each web page Project #2: /Recettes/ '<--- Anonymous /Recettes/Admin/ '<--- WebForm Authentication for each web page I've a Web.Config file that work perfectly for Form authentication. But I
8
2530
by: Quentin Huo | last post by:
Hi: I want to run cacls.exe to check the user right from an ASPX page. In ASP, I can do: Set wshobj=Server.CreateObject("WScript.Shell") resobj=wshobj.Run("cmd /c echo Y| cacls c:", 0, True) Set wshobj=Nothing But I don't know how to do this in ASPX page (writen in C#).
3
2543
by: Ryan Taylor | last post by:
Hi. I need to be able to access a public code behind variable within my ASPX page. The reason is that I have a user control "Header" which defines a table layout, and is included in all my pages, at various levels in the website heirarchy. The table requires a background image. My images folders is at the root of the website, effectively "~/images/". I need the background image to show whether I at a page in the root of my website or in...
6
2013
by: Thomas Andersson | last post by:
Hi all, I've been thinking of about adding new languages to our website and is currently investigating how this could be done. And I know that one way to go would be to create new aspx-pages with new codebehinds for each page I want to have translated. But my question is - is it ok to keep the same codebehind file for a certain page which is translated into different languages. In this way I only need to change to aspx-file (html) of...
3
2782
by: Nathan Sokalski | last post by:
When I view any page in my application a second time, I recieve the following error: System.Web.TraceContext.AddNewControl(String id, String parentId, String type, Int32 viewStateSize) +313 System.Web.UI.Control.BuildProfileTree(String parentId, Boolean calcViewState) +201 System.Web.UI.Control.BuildProfileTree(String parentId, Boolean calcViewState) +263
11
2939
by: =?Utf-8?B?UGV0ZXIgSw==?= | last post by:
I am working with Visual Studio or alternately with Expression Web. I need to create about 50 aspx pages with about 1200 thumbnali images, typically arranged in three to four groups per page, having hyperlinks to the corresponding full size images. Can anybody point me to locations in MSDN or elsewhere giving the references to attach, the commands & objects for creating or opening the pages and possibly available classes? I have done...
0
8393
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
8914
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
8820
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8598
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8670
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...
1
6223
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5695
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
4224
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2810
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

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.