473,386 Members | 1,886 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,386 software developers and data experts.

How to simulate a directory structure of aspx pages with one processing page

Hello!

I would like to have one page on the server, which would be a target
processing page for a number of other aspx pages.

E.g
Processing page
\portal_page.aspx

Target pages
\business\credit_cards\barclaycard.aspx
\business\loans\halifax.aspx
\business\savings_accounts\halifax.aspx
When somebody makes a request to the
\business\credit_cards\barclaycard.aspx then the page would execute a
code from the portal_page.aspx

I know that this behaviour could be easily done by creating all this
target pages and directories and include a portal_page.aspx inside
these pages.

However, in my case the directory will contain thousands of pages and
often new pages will be added or current removed. It would be hard to
maintain such a large directory.

Is it possible to receive a request for
\business\credit_cards\barclaycard.aspx even though the page is not
there? And present to the user the contents of portal_page.aspx but
with a \business\credit_cards\barclaycard.aspx in the address bar.

I know it could be done by capturing HTTPException - file not found in
global.asax. And based on the requested filename, then execute the
portal_page.aspx with appropriate parameters. However, the user would
see a portal_page.aspx in the address bar , rather than
\business\credit_cards\barclaycard.aspx.

Does anyone has any idea how to solve this problem?

Thank you.
Nov 19 '05 #1
2 2157
You could :

1) Try :
http://msdn.microsoft.com/library/de...lrewriting.asp

2) The mention of "including" the portal_page.aspx make me think this is
perhaps not exactly what you want. It looks like you are more looking at a
way to have centralized code. With ASP.NET you can add classes to your
project and use their functionality from any page in your site...

Hope it helps

Patrice

--

"Janusz Jezowicz" <je******@gmail.com> a écrit dans le message de
news:26**************************@posting.google.c om...
Hello!

I would like to have one page on the server, which would be a target
processing page for a number of other aspx pages.

E.g
Processing page
\portal_page.aspx

Target pages
\business\credit_cards\barclaycard.aspx
\business\loans\halifax.aspx
\business\savings_accounts\halifax.aspx
When somebody makes a request to the
\business\credit_cards\barclaycard.aspx then the page would execute a
code from the portal_page.aspx

I know that this behaviour could be easily done by creating all this
target pages and directories and include a portal_page.aspx inside
these pages.

However, in my case the directory will contain thousands of pages and
often new pages will be added or current removed. It would be hard to
maintain such a large directory.

Is it possible to receive a request for
\business\credit_cards\barclaycard.aspx even though the page is not
there? And present to the user the contents of portal_page.aspx but
with a \business\credit_cards\barclaycard.aspx in the address bar.

I know it could be done by capturing HTTPException - file not found in
global.asax. And based on the requested filename, then execute the
portal_page.aspx with appropriate parameters. However, the user would
see a portal_page.aspx in the address bar , rather than
\business\credit_cards\barclaycard.aspx.

Does anyone has any idea how to solve this problem?

Thank you.

Nov 19 '05 #2
I think an HTTPModule is the easiest way to do this. Using an HTTPModule you
could say something like this (pseudocode):
If (Request is in folder "barclaycard") Then
Sever.Execute("portal_page.aspx")
Response.End()
End If

Take a look at this very easy guideline on how to build an HTTPModule:
http://msdn.microsoft.com/library/de...ttpmodules.asp

"Patrice" wrote:
You could :

1) Try :
http://msdn.microsoft.com/library/de...lrewriting.asp

2) The mention of "including" the portal_page.aspx make me think this is
perhaps not exactly what you want. It looks like you are more looking at a
way to have centralized code. With ASP.NET you can add classes to your
project and use their functionality from any page in your site...

Hope it helps

Patrice

--

"Janusz Jezowicz" <je******@gmail.com> a écrit dans le message de
news:26**************************@posting.google.c om...
Hello!

I would like to have one page on the server, which would be a target
processing page for a number of other aspx pages.

E.g
Processing page
\portal_page.aspx

Target pages
\business\credit_cards\barclaycard.aspx
\business\loans\halifax.aspx
\business\savings_accounts\halifax.aspx
When somebody makes a request to the
\business\credit_cards\barclaycard.aspx then the page would execute a
code from the portal_page.aspx

I know that this behaviour could be easily done by creating all this
target pages and directories and include a portal_page.aspx inside
these pages.

However, in my case the directory will contain thousands of pages and
often new pages will be added or current removed. It would be hard to
maintain such a large directory.

Is it possible to receive a request for
\business\credit_cards\barclaycard.aspx even though the page is not
there? And present to the user the contents of portal_page.aspx but
with a \business\credit_cards\barclaycard.aspx in the address bar.

I know it could be done by capturing HTTPException - file not found in
global.asax. And based on the requested filename, then execute the
portal_page.aspx with appropriate parameters. However, the user would
see a portal_page.aspx in the address bar , rather than
\business\credit_cards\barclaycard.aspx.

Does anyone has any idea how to solve this problem?

Thank you.


Nov 19 '05 #3

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

Similar topics

0
by: Santa | last post by:
I am using Fritz Onion's "Asynchronous Pages" approach as mentioned in the article http://msdn.microsoft.com/msdnmag/issues/03/06/Threading/default.aspx to increase the performance of my ASPX...
3
by: Amir Eshterayeh | last post by:
Dear Friends Would you please give me your professional idea about this asp.net problem. I need different virtual directory for different customer with their names like these:...
1
by: Timo | last post by:
I need to incorporate several aspx pages into an existing website. The target structure looks like this: inetpub -- wwwroot ------ webapps --------- App1 ------------subdir1...
0
by: Santa | last post by:
I am using Fritz Onion's "Asynchronous Pages" approach as mentioned in the article http://msdn.microsoft.com/msdnmag/issues/03/06/Threading/default.aspx to increase the performance of my ASPX...
6
by: Martin Bischoff | last post by:
Hi, I'm creating temporary directories in my web app (e.g. ~/data/temp/temp123) to allow users to upload files. When I later delete these directories (from the code behind), the application...
2
by: moondaddy | last post by:
I have a simple sample site I'm building in asp.net 2.0. I created a master page and a default.aspx content page in the project's root directory. Then I created a subfolder called content and...
13
by: Matt | last post by:
Does anyone know how to hide the ASPX extension of web pages in ASP.Net 2.0? Thanks, Matt
4
by: Zeba | last post by:
Hi guys, I've got a confusing problem regarding my directory structure. My directory structure is something like StoreCore(root directort to which IIS points) The masterpage.master uses...
4
by: tshad | last post by:
I have a site www.stf.com and a site www.stfstage.com (where I do all my testing). The problem is that www.stfstage.com is only internal and I need to get access from the outside (without...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...

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.