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

J

Janusz Jezowicz

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.
 
J

Jennifer Mathews

Create a class ( i.e. myClass.dll ) and call that class from each each of your pages:

\business\credit_cards\barclaycard.aspx
\business\loans\halifax.aspx
\business\savings_accounts\halifax.aspx

using a placeholder object in your aspx pages.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top