Mapping paths to aspx pages

S

Samuel Kim

Hi,

Is there any way that we can map a path to a aspx file at a different
location?

In essence, I need to make different http addresses to point ot he same
aspx file - for example,
http://server/webprj/abc/index.aspx
http://server/webprj/def/index.aspx
to point ot the same aspx file (say at /webprj/index.aspx)

I'm planning to apply different skin (style) on different folders, but
want to keep the aspx file in one place - so I don't have to edit 10
different index.aspx file when a change is required.

I have thought about
1) virtual folders in IIS, and
2) keeping same aspx files with same code-behind

but want to find out if there is a neater way to solve this issue.
 
G

Guest

We think virtual folders in IIS is actually a neat way. Remember, if you want
to point directly to a subfolder in your web application, you'll need to
create a bin folder in that subfolder, to avoid a 'Could not load type
"'MyType'." error.

Kind regards,
Nikander & Margriet Bruggeman
 
W

Wilco Bauwer

You could either duplicate the files and define a different "master
page" (using some kind of master pages solution).

You could also dynamically change the "master page" or css based on a
part of the requested url. In that case you could use a rewrite engine
(either google for one or roll your own, its quite trivial) to define
the mappings for urls to files (also refered to as "url rewriting").
You can then write some logic which checks what the requested url is,
and use this to load the correct master page/css/whatever.

HTH.
 

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

No members online now.

Forum statistics

Threads
473,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top