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 2 1408
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**********@ftsolutions.com> wrote in message
news:ei**************@TK2MSFTNGP09.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
"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:Oq**************@TK2MSFTNGP12.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**********@ftsolutions.com> wrote in message news:ei**************@TK2MSFTNGP09.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
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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...
|
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"...
|
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:...
|
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)...
|
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...
| |
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...
|
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...
|
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,...
|
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,...
|
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...
|
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...
| |
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...
|
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: 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...
|
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 ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |