Reply to Re: Create page 'on the fly' & Use of Period / Stop / . in url

Your name:

Reply:


Posted by iam247 on 01/02/07 13:48

Hi

Thanks for your reply. I obviously did not make myself clear. Lets try
again.

Forget about the 404 - it is only confusing the issue.

GENERATE PAGE ON THE FLY
I am aware that ASP generates the page 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
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)?

I trust I have been clearer this time.

Thanks ColinK


Harlan Messinger wrote:

> iam247@gmail.com wrote:
> > Hi
> >
> > I want to create a dynamic web page which is only created when the
> > users browser requests it. eg
> >
> > www.mydomain.com/jim.wilson.aspx
> > or www.mydomain.com/bill.smith.htm
> >
> > 2 questions:
> >
> > 1.
> > I know that the use of Period / Stop / . is primarily to separate the
> > page neme from the page type eg mypage.htm or mypage.asp and that the .
> > is not normally used within a page name.
> >
> > The use of the Period / Stop / . works ok when I create a page in
> > Frontpage eg test.page.htm but I have not tested it on a live server.
> >
> > Will the . work as described above?
>
> The part after the period is called the "extension". I'm not sure what
> you mean by "working", but IIS will by default serve files with any of
> the extensions .htm, .html, .asp, .aspx as text/html. You can use ASP or
> ASP.NET (or any server-side app) to produce response of other types, but
> then you have put
>
> Response.ContentType = "[media type]"
>
> in ASP, or the ASP.NET equivalent, into your code, at the top, before
> the code has generated any content.
>
> But if the page you've created has ASP.NET code in it, and the extension
> is .htm or .html, the code isn't going to be executed either locally or
> on a server. You *can* configure IIS to treat .htm or .html files as
> ASP.NET pages, but why would you do that instead of just giving them an
> .aspx extension?
>
> > 2.
> > Using ASP.net is it practical to create my requirements where the page
> > is generated 'on the fly' ie Jim.Wilson's page is only generated when
> > someone requests that specific url?
>
> I don't understand your question. The server doesn't send any page until
> someone requests it. Further, any page that contains server-side code is
> by definition being generated on the fly.
>
> >
> > I know that some sites I visit with an invalid url return a default
> > message with an index page (rather than a '404'), so I am assuming that
> > good asp programming could also dynamically generate jim.wilson.aspx
>
> I really don't understand the connection here. You can configure IIS to
> send a custom page in place of any of the default pages that it sends
> for any of the error conditions from 401 on up, including 404. How IIS
> is set up to respond to 404 errors has nothing to do with the way you've
> built or named your pages.
>
> Because of this last part, I'm starting to think that you haven't asked
> your real question--that this is a case where you've got a problem,
> you're assuming that the solution takes a particular form, and then you
> have questions about how to make that solution happens, which isn't
> going to help you if that isn't the right solution in the first place.
> What are you really trying to do? If the underlying question is, "How do
> I change the way my server responds to a 404 error?", and you've noticed
> that IIS seems to require a file whose name ends in .htm and doesn't
> work if you provide a file name that ends in .aspx, the answer is that
> you are also given a choice between "File" and "URL", and you have to
> change it from "File" to "URL" if you want the response to come from an
> ASP.NET page instead of a static HTML file.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация