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

Mapping paths to aspx pages

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.

Nov 19 '05 #1
3 1052
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

"Samuel Kim" wrote:
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.

Nov 19 '05 #2
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.

Nov 19 '05 #3
Hello Samuel,

You could look at using URL rewriting [1] do map your request to something
like:

http://server/webprj/index.aspx?skin=abc

[1] http://msdn.microsoft.com/asp.net/de...lrewriting.asp

--
Matt Berther
http://www.mattberther.com
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.


Nov 19 '05 #4

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

Similar topics

7
by: Timothy Madden | last post by:
Hello all I'm trying to include some files in an included file. Think of some scripts like this /index.php /scripts/logging.php /scripts/config.php /scripts/db_access.php
1
by: Ian Turner | last post by:
Hi, Is there anyway, without dropping back to C++ and ISAPI filters, whereby I can route requests to virtual url paths through to the ASPNET runtime and ultimately processed by an HttpModule? ...
3
by: tsteinke | last post by:
Okay so I had some aspx pages with document relative links to images and webusercontrols (which also have doc relative pats to images) I wanted to use forms authentication on, so I was forced to...
2
by: landers | last post by:
Hi All, I have created a vb file that inherits a System.Web.UI.Page. As I am against duplicating source code, I have set the Codebehind attribute on all my aspx pages in the same directory. ...
3
by: versteijn | last post by:
Hello all, I know that I can handle 404 errors on ASPX paths, like www.domain.com/doesnotexist.aspx. But I want to handle 404's like on www.domain.com/foldername. Is this possible, and how...
3
by: C | last post by:
Hi, I have a User Control (.ascx) which has links to all the ASPX Pages that exist in my application. This User Control is used on all my ASPX's. I am havinga problem with the paths in my...
2
by: Rob R. Ainscough | last post by:
I'm using a single Master page. I'm having some strange results using Redirects in master pages using relative pathing i.e ~. I'm using Form authentication and whenever I navigate to my Login...
0
by: Arthur Dent | last post by:
I have a PageBase class I use which has a bunch of properties to get various "path" components for the page... such as: protocol: http server: www.myserver.com full: ...
10
by: =?Utf-8?B?Z3JlYXRiYXJyaWVyODY=?= | last post by:
Sorry about that previous one. I pressed enter too early. How does one go about mapping a network drive in C#. i know you use MapNetworkDrive in scripting languages, but i'm not sure how to do it...
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: 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?
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
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
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
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.