473,408 Members | 2,405 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,408 software developers and data experts.

ASP.NET code in two files

Hi all,

I'm working on project with ASP.NET with code behind(C#). On page load I
always check security. I found out, that any little change it that part,
make a lot of work, because there is many files to change that little
correction. I try to make thih in another file, but without success,
because a was not able to make some instructions like "Cache" or
"Resoponse.Redirect". Can ANYone show me example how a have to do this, or
help me some other way, like URL with help or example!

Thanks in advace for any help,

Jan Kraljič (Mr.)

Nov 18 '05 #1
3 871
It sounds as if you are building a utility class for some common code
that does security checks but need access to request specific
information.

You can use HttpContext.Current get to all the important properties
associated with a request, for example, the Cache object, the
Applicaiton object, the Request and Response objects etc.

HTH.

--
Scott
http://www.OdeToCode.com
On Mon, 02 Feb 2004 12:58:28 +0100, Jan Kraljic <ja*@patware.si>
wrote:
Hi all,

I'm working on project with ASP.NET with code behind(C#). On page load I
always check security. I found out, that any little change it that part,
make a lot of work, because there is many files to change that little
correction. I try to make thih in another file, but without success,
because a was not able to make some instructions like "Cache" or
"Resoponse.Redirect". Can ANYone show me example how a have to do this, or
help me some other way, like URL with help or example!

Thanks in advace for any help,

Jan Kraljič (Mr.)


Nov 18 '05 #2
thx, that it!!

On Mon, 02 Feb 2004 09:51:18 -0500, Scott Allen wrote:
It sounds as if you are building a utility class for some common code
that does security checks but need access to request specific
information.

You can use HttpContext.Current get to all the important properties
associated with a request, for example, the Cache object, the
Applicaiton object, the Request and Response objects etc.

HTH.

--
Scott
http://www.OdeToCode.com
On Mon, 02 Feb 2004 12:58:28 +0100, Jan Kraljic <ja*@patware.si>
wrote:
Hi all,

I'm working on project with ASP.NET with code behind(C#). On page load I
always check security. I found out, that any little change it that part,
make a lot of work, because there is many files to change that little
correction. I try to make thih in another file, but without success,
because a was not able to make some instructions like "Cache" or
"Resoponse.Redirect". Can ANYone show me example how a have to do this, or
help me some other way, like URL with help or example!

Thanks in advace for any help,

Jan Kraljic (Mr.)


Nov 18 '05 #3
Hi, You should also look into using inheritance (placing the common
code in the superclass), to avoid having duplicate code.

http://www.xpcoder.net

Jan Kraljic <ja*@patware.si> wrote in message news:<pa**************************@patware.si>...
Hi all,

I'm working on project with ASP.NET with code behind(C#). On page load I
always check security. I found out, that any little change it that part,
make a lot of work, because there is many files to change that little
correction. I try to make thih in another file, but without success,
because a was not able to make some instructions like "Cache" or
"Resoponse.Redirect". Can ANYone show me example how a have to do this, or
help me some other way, like URL with help or example!

Thanks in advace for any help,

Jan Kraljič (Mr.)

Nov 18 '05 #4

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

Similar topics

8
by: sachin bond | last post by:
The following code(in c++) is supposed to divide a file into 'n' different files. suppose i'm having a file called "input.zip". The execution of the following code should divide "input.zip"...
1
by: LenS | last post by:
If this is the wrong place to post this, please advise better place. Otherwise, I have created the following python program and it works. Running on XP. I think I am now at that stage of learning...
2
by: bob | last post by:
Hello, I want to show progress to the user while some method is running so I thought I'd use a progress bar. But I don't see how I can do this without writing GUI code in the model? In...
0
by: Ganapathy | last post by:
I have COM dll code written in VC 6.0. When i tried compiling this code in VC 7, The MIDL cmpiler gets called twice. i.e. it initially compiles fully & immediately a line - 64 bit processing'...
6
by: Peter Row | last post by:
Hi, Can someone give me a set of steps for an ASP.NET project (well actually its just a VB.NET class DLL that implements HttpHandler) that will work when moved to another developers machine? ...
6
by: Jay | last post by:
Is it possible to view the source code for .NET classes? Thanks. Jay
171
by: tshad | last post by:
I am just trying to decide whether to split my code and uses code behind. I did it with one of my pages and found it was quite a bit of trouble. I know that most people (and books and articles)...
19
by: Alan Silver | last post by:
Hello, I have been developing ASP.NET with a text editor so far (better way to learn initially), and have now been trying Visual Web Developer. I want to create a project for an existing site...
7
by: Alan Silver | last post by:
Hello, I am just looking at VWD and seeing what needs doing to take an existing site I've written by hand and importing it into VWD. I've already discovered that I need to rename my code-behind...
8
by: =?Utf-8?B?QnJ5YW4=?= | last post by:
Hello group. I have some code (given to me), but I don't know alot about ASP, so I was hoping someone here can help. Running on Win 2008 server. The code below will scan a folder and subfolder...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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,...
0
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...
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
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.