Create page name 'on the fly' & Use of Period / Stop / . in url

I

iam247

Hi

Can the following 2 things be done in asp.net? I do not need a lot of
guidance on how to implement - just can it be done and any anticipated
problems.

1. GENERATE PAGE ON THE FLY
I am aware that ASP generates pages on the fly, but I believe it is
normally the page content which it generates on the fly - I want the
page name genetated 'on the fly' as well as the content.


eg I have a thousand members in my database but I do not want to have
1000 individual web pages on my server. Jane Smith should be able to
give her friends the following url www.mysystem.com/janesmith.aspx -
the page will only be generated when users request it. When the page is

generated it will also add individual content relating to Jane Smith.


Am I correct that this is a reasonaby straightforward procedure in
ASP.net?


USE OF PERIOD IN PAGE NAME - other than before extension
I would like Jane Smith to be able to set up her user name on my system

as jane.smith rather than janesmith. Assuming my 'on the fly' page
generation above is possible I would like her page name to be
jane.smith.aspx (ie with a period in the page name).


Will she be able to give the following url to users,
www.mysystem.com/jane.smith.aspx - and will users be able to access it
(in other words - will the . in the page name cause any problems)?

Thanks in anticipation ColinK
 
G

gerry

absolutely.

i setup a site in 1.1 that consists of a single .aspx page on the server
that serves up a few hundred different pages based on the requested url.
 
L

Laurent Bugnion [MVP]

Hi,

Hi

Can the following 2 things be done in asp.net? I do not need a lot of
guidance on how to implement - just can it be done and any anticipated
problems.

1. GENERATE PAGE ON THE FLY
I am aware that ASP generates pages on the fly, but I believe it is
normally the page content which it generates on the fly - I want the
page name genetated 'on the fly' as well as the content.


eg I have a thousand members in my database but I do not want to have
1000 individual web pages on my server. Jane Smith should be able to
give her friends the following url www.mysystem.com/janesmith.aspx -
the page will only be generated when users request it. When the page is

generated it will also add individual content relating to Jane Smith.


Am I correct that this is a reasonaby straightforward procedure in
ASP.net?

There is a nice URL rewriting strategy where you define an ASPX page in
IIS which is loaded whenever a page is not found (404 error code). This
page, when activated, can generate content or redirect to another
existing page. I think that this would be appropriate for your problem:
when a non-existing page is hit, the error page gets kicked, reads the
URL and generates appropriate content.

Make sure to read this though:
http://odetocode.com/Blogs/scott/archive/2004/09/22/509.aspx
USE OF PERIOD IN PAGE NAME - other than before extension
I would like Jane Smith to be able to set up her user name on my system

as jane.smith rather than janesmith. Assuming my 'on the fly' page
generation above is possible I would like her page name to be
jane.smith.aspx (ie with a period in the page name).


Will she be able to give the following url to users,
www.mysystem.com/jane.smith.aspx - and will users be able to access it
(in other words - will the . in the page name cause any problems)?

Thanks in anticipation ColinK

Periods in a page's name are not illegal. In your case even less, since
that page doesn't actually exist on the server ;-)

HTH
Laurent
 
G

gerry

another simple way to accomplish this is via Application_BeginRequest &
Context.RewritePath which is called before a 404 is triggered.

Gerry




Laurent Bugnion said:
Hi,

Hi

Can the following 2 things be done in asp.net? I do not need a lot of
guidance on how to implement - just can it be done and any anticipated
problems.

1. GENERATE PAGE ON THE FLY
I am aware that ASP generates pages on the fly, but I believe it is
normally the page content which it generates on the fly - I want the
page name genetated 'on the fly' as well as the content.


eg I have a thousand members in my database but I do not want to have
1000 individual web pages on my server. Jane Smith should be able to
give her friends the following url www.mysystem.com/janesmith.aspx -
the page will only be generated when users request it. When the page is

generated it will also add individual content relating to Jane Smith.


Am I correct that this is a reasonaby straightforward procedure in
ASP.net?

There is a nice URL rewriting strategy where you define an ASPX page in
IIS which is loaded whenever a page is not found (404 error code). This
page, when activated, can generate content or redirect to another existing
page. I think that this would be appropriate for your problem: when a
non-existing page is hit, the error page gets kicked, reads the URL and
generates appropriate content.

Make sure to read this though:
http://odetocode.com/Blogs/scott/archive/2004/09/22/509.aspx
USE OF PERIOD IN PAGE NAME - other than before extension
I would like Jane Smith to be able to set up her user name on my system

as jane.smith rather than janesmith. Assuming my 'on the fly' page
generation above is possible I would like her page name to be
jane.smith.aspx (ie with a period in the page name).


Will she be able to give the following url to users,
www.mysystem.com/jane.smith.aspx - and will users be able to access it
(in other words - will the . in the page name cause any problems)?

Thanks in anticipation ColinK

Periods in a page's name are not illegal. In your case even less, since
that page doesn't actually exist on the server ;-)

HTH
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
 
L

Laurent Bugnion [MVP]

Hi,
another simple way to accomplish this is via Application_BeginRequest &
Context.RewritePath which is called before a 404 is triggered.

Gerry

True, if the page called is ASP.NET (which is the case for the OP, so I
should have suggested that ;-)

Greetings,
Laurent
 

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,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top