|
|
Subject: Re: How to Make Dynamic Content Look Like Static Pages? - msg#00304
List: windows.devel.dotnet.web
Hi Paul,
I am afraid I don't understand how your CMS works. What do you mean by
'flat .aspx'? No code behind?
What I need is a way for my client to be able to enter content (articles)
and have them be displayed by a single .aspx page without using a
querystring to specify which article to display (the content may be stored
in xml or in a database...this has not been decided yet). For example, I
would like to have links on a page that would point to /page1.aspx,
/page2.aspx and /page3.aspx. When the user clicks each of the links (or a
bot requests them), what is really executed is /showarticle.aspx?ID=1 or
/showarticle.aspx?ID=2, etc.
Could you explain in a little more detail how your CMS would handle this?
Thanks,
Chris
-----Original Message-----
From: Discussion of building .NET applications targeted for the Web
[ mailto:DOTNET-WEB@xxxxxxxxxxxxxxxxxxx] On Behalf Of Paul Gaske (Public
Mail)
Sent: Monday, February 23, 2004 7:00 PM
To: DOTNET-WEB@xxxxxxxxxxxxxxxxxxx
Subject: Re: [DOTNET-WEB] How to Make Dynamic Content Look Like Static
Pages?
We wrote a CMS recently that generates flat .aspx (stored on back-end in xml
and rendered to aspx prior to deployment to web by xsl). All dynamic
content is done via "custom controls" - plain old .ascx's. Works well
because 95% of pages don't need anything custom, and those few pages
requiring an email form or whatever just get a new .ascx written for them.
No handlers, no re-writers/isapi/httphandlers, nothing to go wrong.
Users looking at the page have no way to tell that the page is from a CMS.
Neither do crawlers.
Cheers,
Paul.
> -----Original Message-----
> From: Discussion of building .NET applications targeted for the Web
> [mailto:DOTNET-WEB@xxxxxxxxxxxxxxxxxxx] On Behalf Of Thomas Tomiczek
> Sent: Tuesday, 24 February 2004 7:52 AM
> To: DOTNET-WEB@xxxxxxxxxxxxxxxxxxx
> Subject: Re: How to Make Dynamic Content Look Like Static Pages?
>
> What about the simple thing that WE do in OUR CMS :-)
>
> Run all paths through a handler.
>
> Like:
>
> /cms.ashx/this/is/a/path.aspx
>
> Which is handled by a template we determine. "cms.ashx" is a http
> handler and gets all the requests. The rest is trivial first hour
> programming string manipulation:
>
> // Step 1: determine the called Url
> string handlerUrl = request.CurrentExecutionFilePath; string calledUrl
> = request.RawUrl; int handlerUrlLengh = (calledUrl.Length >
> handlerUrl.Length) ?
> handlerUrl.Length+1 : handlerUrl.Length; calledUrl =
> calledUrl.Substring (handlerUrlLengh);
>
> And voila - you intercept all and any request. This is the ONLY way
that
> is working, btw., without any change to the metabase, without any
> ISAPI-Filter-Installation, without anything like this. So it works with
> Xcopy-Deployment. And there is no nasty "?" in the querystring anymore.
>
> Easy, isn't it?
>
> Thomas Tomiczek
>
>
> > -----Original Message-----
> > From: Discussion of building .NET applications targeted for the Web
> > [mailto:DOTNET-WEB@xxxxxxxxxxxxxxxxxxx] On Behalf Of Christopher
> > Morse
> > Sent: Montag, 23. Februar 2004 22:34
> > To: DOTNET-WEB@xxxxxxxxxxxxxxxxxxx
> > Subject: Re: [DOTNET-WEB] How to Make Dynamic Content Look Like
> > Static Pages?
> >
> > Mark,
> >
> > Perfect.
> >
> > I pick door number 1...
> >
> > This is similar to the only working theory I had previous to your
> > suggestion, which was to make a custom 404 error page in asp.net
> > which would basically do the same thing.
> >
> > Thank you,
> > Chris
> >
> > -----Original Message-----
> > From: Discussion of building .NET applications targeted for the Web
> > [mailto:DOTNET-WEB@xxxxxxxxxxxxxxxxxxx] On Behalf Of Mark W
> > Sent: Monday, February 23, 2004 3:41 PM
> > To: DOTNET-WEB@xxxxxxxxxxxxxxxxxxx
> > Subject: Re: [DOTNET-WEB] How to Make Dynamic Content Look Like
> > Static Pages?
> >
> > Depending on the complexity of your site, you could re-write the
URLs.
> > A simple example is here.
> >
> > http://www.aspnetpro.com/NewsletterArticle/2003/09/asp200309pj
> > _l/asp200309pj
> > _l.asp (or http://snipurl.com/4ogk )
> >
> > Alternatively you can write your own httphandler e.g.
> > http://msdn.microsoft.com/msdnmag/issues/02/08/HTTPFilters/def
> > ault.aspx
> > (or http://snipurl.com/4ogp )
> >
> >
> > HTH
> >
> > Mark
> >
> >
> > -----Original Message-----
> > From: Discussion of building .NET applications targeted for the Web
> > [mailto:DOTNET-WEB@xxxxxxxxxxxxxxxxxxx] On Behalf Of Christopher
> > Morse
> > Sent: Tuesday, 24 February 2004 9:28 a.m.
> > To: DOTNET-WEB@xxxxxxxxxxxxxxxxxxx
> > Subject: [DOTNET-WEB] How to Make Dynamic Content Look Like Static
> > Pages?
> >
> > Hello All,
> >
> > I would like to create a Content Management System for a client in
> > ASP.NET and I would like to avoid using the querystring to determine
> > which content to display (so that the site can be properly indexed by
> > search engines).
> > However, I would still like the pages to be .ASPX pages so that
> > certain parts of the page can be dynamic.
> >
> > I did this in the 'old days' using ASP by creating a templating
> > system that generated .asp pages. However, it is not so easy with
> > ASP.NET as the pages obviously need to be compiled. I guess I could
> > still do it and call the command line compiler from my ASP.NET
> > templating code, but this doesn't seem like an ideal solution.
> >
> > Any suggestions would be appreciated.
> >
> > Best regards,
> > Chris
> >
> > Christopher Morse
> > eInfoSystems.net, Inc.
> > www.einfosystems.net <http://www.einfosystems.net/>
> >
> > ===================================
> > This list is hosted by DevelopMentor. http://www.develop.com NEW!
> > ASP.NET courses you may be interested in:
> >
> > Guerrilla ASP.NET, 17 May 2004, in Los Angeles
> > http://www.develop.com/courses/gaspdotnetls
> >
> > View archives and manage your subscription(s) at
> > http://discuss.develop.com
> >
> > ===================================
> > This list is hosted by DevelopMentor(r) http://www.develop.com NEW!
> > ASP.NET courses you may be interested in:
> >
> > Guerrilla ASP.NET, 17 May 2004, in Los Angeles
> > http://www.develop.com/courses/gaspdotnetls
> >
> > View archives and manage your subscription(s) at
> > http://discuss.develop.com
> >
> >
>
> ===================================
> This list is hosted by DevelopMentor(r) http://www.develop.com NEW!
> ASP.NET courses you may be interested in:
>
> Guerrilla ASP.NET, 17 May 2004, in Los Angeles
> http://www.develop.com/courses/gaspdotnetls
>
> View archives and manage your subscription(s) at
http://discuss.develop.com
===================================
This list is hosted by DevelopMentor. http://www.develop.com NEW! ASP.NET
courses you may be interested in:
Guerrilla ASP.NET, 17 May 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls
View archives and manage your subscription(s) at http://discuss.develop.com
===================================
This list is hosted by DevelopMentor® http://www.develop.com
NEW! ASP.NET courses you may be interested in:
Guerrilla ASP.NET, 17 May 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls
View archives and manage your subscription(s) at http://discuss.develop.com
Was this page helpful?
Thread at a glance:
Previous Message by Date:
click to view message preview
Re: How to Make Dynamic Content Look Like Static Pages?
We wrote a CMS recently that generates flat .aspx (stored on back-end in
xml and rendered to aspx prior to deployment to web by xsl). All
dynamic content is done via "custom controls" - plain old .ascx's. Works
well because 95% of pages don't need anything custom, and those few
pages requiring an email form or whatever just get a new .ascx written
for them.
No handlers, no re-writers/isapi/httphandlers, nothing to go wrong.
Users looking at the page have no way to tell that the page is from a
CMS. Neither do crawlers.
Cheers,
Paul.
>-----Original Message-----
>From: Discussion of building .NET applications targeted for the Web
>[mailto:DOTNET-WEB@xxxxxxxxxxxxxxxxxxx] On Behalf Of Thomas Tomiczek
>Sent: Tuesday, 24 February 2004 7:52 AM
>To: DOTNET-WEB@xxxxxxxxxxxxxxxxxxx
>Subject: Re: How to Make Dynamic Content Look Like Static Pages?
>
>What about the simple thing that WE do in OUR CMS :-)
>
>Run all paths through a handler.
>
>Like:
>
>/cms.ashx/this/is/a/path.aspx
>
>Which is handled by a template we determine. "cms.ashx" is a http
>handler and gets all the requests. The rest is trivial first hour
>programming string manipulation:
>
>// Step 1: determine the called Url
>string handlerUrl = request.CurrentExecutionFilePath;
>string calledUrl = request.RawUrl;
>int handlerUrlLengh = (calledUrl.Length > handlerUrl.Length) ?
>handlerUrl.Length+1 : handlerUrl.Length;
>calledUrl = calledUrl.Substring (handlerUrlLengh);
>
>And voila - you intercept all and any request. This is the ONLY way
that
>is working, btw., without any change to the metabase, without any
>ISAPI-Filter-Installation, without anything like this. So it works with
>Xcopy-Deployment. And there is no nasty "?" in the querystring anymore.
>
>Easy, isn't it?
>
>Thomas Tomiczek
>
>
>> -----Original Message-----
>> From: Discussion of building .NET applications targeted for
>> the Web [mailto:DOTNET-WEB@xxxxxxxxxxxxxxxxxxx] On Behalf Of
>> Christopher Morse
>> Sent: Montag, 23. Februar 2004 22:34
>> To: DOTNET-WEB@xxxxxxxxxxxxxxxxxxx
>> Subject: Re: [DOTNET-WEB] How to Make Dynamic Content Look
>> Like Static Pages?
>>
>> Mark,
>>
>> Perfect.
>>
>> I pick door number 1...
>>
>> This is similar to the only working theory I had previous to
>> your suggestion, which was to make a custom 404 error page in
>> asp.net which would basically do the same thing.
>>
>> Thank you,
>> Chris
>>
>> -----Original Message-----
>> From: Discussion of building .NET applications targeted for
>> the Web [mailto:DOTNET-WEB@xxxxxxxxxxxxxxxxxxx] On Behalf Of Mark W
>> Sent: Monday, February 23, 2004 3:41 PM
>> To: DOTNET-WEB@xxxxxxxxxxxxxxxxxxx
>> Subject: Re: [DOTNET-WEB] How to Make Dynamic Content Look
>> Like Static Pages?
>>
>> Depending on the complexity of your site, you could re-write the
URLs.
>> A simple example is here.
>>
>> http://www.aspnetpro.com/NewsletterArticle/2003/09/asp200309pj
>> _l/asp200309pj
>> _l.asp (or http://snipurl.com/4ogk )
>>
>> Alternatively you can write your own httphandler e.g.
>> http://msdn.microsoft.com/msdnmag/issues/02/08/HTTPFilters/def
>> ault.aspx
>> (or http://snipurl.com/4ogp )
>>
>>
>> HTH
>>
>> Mark
>>
>>
>> -----Original Message-----
>> From: Discussion of building .NET applications targeted for
>> the Web [mailto:DOTNET-WEB@xxxxxxxxxxxxxxxxxxx] On Behalf Of
>> Christopher Morse
>> Sent: Tuesday, 24 February 2004 9:28 a.m.
>> To: DOTNET-WEB@xxxxxxxxxxxxxxxxxxx
>> Subject: [DOTNET-WEB] How to Make Dynamic Content Look Like
>> Static Pages?
>>
>> Hello All,
>>
>> I would like to create a Content Management System for a
>> client in ASP.NET and I would like to avoid using the
>> querystring to determine which content to display (so that
>> the site can be properly indexed by search engines).
>> However, I would still like the pages to be .ASPX pages so
>> that certain parts of the page can be dynamic.
>>
>> I did this in the 'old days' using ASP by creating a
>> templating system that generated .asp pages. However, it is
>> not so easy with ASP.NET as the pages obviously need to be
>> compiled. I guess I could still do it and call the command
>> line compiler from my ASP.NET templating code, but this
>> doesn't seem like an ideal solution.
>>
>> Any suggestions would be appreciated.
>>
>> Best regards,
>> Chris
>>
>> Christopher Morse
>> eInfoSystems.net, Inc.
>> www.einfosystems.net <http://www.einfosystems.net/>
>>
>> ===================================
>> This list is hosted by DevelopMentor. http://www.develop.com
>> NEW! ASP.NET courses you may be interested in:
>>
>> Guerrilla ASP.NET, 17 May 2004, in Los Angeles
>> http://www.develop.com/courses/gaspdotnetls
>>
>> View archives and manage your subscription(s) at
>> http://discuss.develop.com
>>
>> ===================================
>> This list is hosted by DevelopMentor(r) http://www.develop.com
>> NEW! ASP.NET courses you may be interested in:
>>
>> Guerrilla ASP.NET, 17 May 2004, in Los Angeles
>> http://www.develop.com/courses/gaspdotnetls
>>
>> View archives and manage your subscription(s) at
>> http://discuss.develop.com
>>
>>
>
>===================================
>This list is hosted by DevelopMentor(r) http://www.develop.com
>NEW! ASP.NET courses you may be interested in:
>
>Guerrilla ASP.NET, 17 May 2004, in Los Angeles
>http://www.develop.com/courses/gaspdotnetls
>
>View archives and manage your subscription(s) at
http://discuss.develop.com
===================================
This list is hosted by DevelopMentor® http://www.develop.com
NEW! ASP.NET courses you may be interested in:
Guerrilla ASP.NET, 17 May 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls
View archives and manage your subscription(s) at http://discuss.develop.com
Next Message by Date:
click to view message preview
struct newbie
I have some classes that are there simply to act as holders for
"entities" for lack of a better word. I am considering making these
classes as strucst since they contain no other logic.
1) From what I have learned about structs it appears that the only
constructor you can have is one that initializes all members of the
struct, otherwise you can't have a struct at all; not even to initialize
a few of the members. Its all or nothing.
2) Now, it also seems that if I only want to use these to basically
be instance data holders that will then get assigned to another class
which has properties of the struct types. I then want to serialize down
the main class to xml so that I have an xml document that represents for
example the CustomerInfo, OrderInfo, PaymentInfo structs as one xml
document.
Does it make sense that I use structs for these entity data holders,
since I don't necessarily need them to be classes I don't think?
Also, will I run into problems later when I try to serialize the "main
class" that has these struct properties down to xml? One requirement is
that I mark public properties of my structs to serialize with a
different name because the xml must use predefined node names that are
not user friendly, so I guess I need to make sure I can mark my structs
as serializable and that I can give each property a different name to
serialize down as. I know this can be done with serialization
attributes; I have just never done it with structs before.
===================================
This list is hosted by DevelopMentor® http://www.develop.com
NEW! ASP.NET courses you may be interested in:
Guerrilla ASP.NET, 17 May 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls
View archives and manage your subscription(s) at http://discuss.develop.com
Previous Message by Thread:
click to view message preview
Re: How to Make Dynamic Content Look Like Static Pages?
We wrote a CMS recently that generates flat .aspx (stored on back-end in
xml and rendered to aspx prior to deployment to web by xsl). All
dynamic content is done via "custom controls" - plain old .ascx's. Works
well because 95% of pages don't need anything custom, and those few
pages requiring an email form or whatever just get a new .ascx written
for them.
No handlers, no re-writers/isapi/httphandlers, nothing to go wrong.
Users looking at the page have no way to tell that the page is from a
CMS. Neither do crawlers.
Cheers,
Paul.
>-----Original Message-----
>From: Discussion of building .NET applications targeted for the Web
>[mailto:DOTNET-WEB@xxxxxxxxxxxxxxxxxxx] On Behalf Of Thomas Tomiczek
>Sent: Tuesday, 24 February 2004 7:52 AM
>To: DOTNET-WEB@xxxxxxxxxxxxxxxxxxx
>Subject: Re: How to Make Dynamic Content Look Like Static Pages?
>
>What about the simple thing that WE do in OUR CMS :-)
>
>Run all paths through a handler.
>
>Like:
>
>/cms.ashx/this/is/a/path.aspx
>
>Which is handled by a template we determine. "cms.ashx" is a http
>handler and gets all the requests. The rest is trivial first hour
>programming string manipulation:
>
>// Step 1: determine the called Url
>string handlerUrl = request.CurrentExecutionFilePath;
>string calledUrl = request.RawUrl;
>int handlerUrlLengh = (calledUrl.Length > handlerUrl.Length) ?
>handlerUrl.Length+1 : handlerUrl.Length;
>calledUrl = calledUrl.Substring (handlerUrlLengh);
>
>And voila - you intercept all and any request. This is the ONLY way
that
>is working, btw., without any change to the metabase, without any
>ISAPI-Filter-Installation, without anything like this. So it works with
>Xcopy-Deployment. And there is no nasty "?" in the querystring anymore.
>
>Easy, isn't it?
>
>Thomas Tomiczek
>
>
>> -----Original Message-----
>> From: Discussion of building .NET applications targeted for
>> the Web [mailto:DOTNET-WEB@xxxxxxxxxxxxxxxxxxx] On Behalf Of
>> Christopher Morse
>> Sent: Montag, 23. Februar 2004 22:34
>> To: DOTNET-WEB@xxxxxxxxxxxxxxxxxxx
>> Subject: Re: [DOTNET-WEB] How to Make Dynamic Content Look
>> Like Static Pages?
>>
>> Mark,
>>
>> Perfect.
>>
>> I pick door number 1...
>>
>> This is similar to the only working theory I had previous to
>> your suggestion, which was to make a custom 404 error page in
>> asp.net which would basically do the same thing.
>>
>> Thank you,
>> Chris
>>
>> -----Original Message-----
>> From: Discussion of building .NET applications targeted for
>> the Web [mailto:DOTNET-WEB@xxxxxxxxxxxxxxxxxxx] On Behalf Of Mark W
>> Sent: Monday, February 23, 2004 3:41 PM
>> To: DOTNET-WEB@xxxxxxxxxxxxxxxxxxx
>> Subject: Re: [DOTNET-WEB] How to Make Dynamic Content Look
>> Like Static Pages?
>>
>> Depending on the complexity of your site, you could re-write the
URLs.
>> A simple example is here.
>>
>> http://www.aspnetpro.com/NewsletterArticle/2003/09/asp200309pj
>> _l/asp200309pj
>> _l.asp (or http://snipurl.com/4ogk )
>>
>> Alternatively you can write your own httphandler e.g.
>> http://msdn.microsoft.com/msdnmag/issues/02/08/HTTPFilters/def
>> ault.aspx
>> (or http://snipurl.com/4ogp )
>>
>>
>> HTH
>>
>> Mark
>>
>>
>> -----Original Message-----
>> From: Discussion of building .NET applications targeted for
>> the Web [mailto:DOTNET-WEB@xxxxxxxxxxxxxxxxxxx] On Behalf Of
>> Christopher Morse
>> Sent: Tuesday, 24 February 2004 9:28 a.m.
>> To: DOTNET-WEB@xxxxxxxxxxxxxxxxxxx
>> Subject: [DOTNET-WEB] How to Make Dynamic Content Look Like
>> Static Pages?
>>
>> Hello All,
>>
>> I would like to create a Content Management System for a
>> client in ASP.NET and I would like to avoid using the
>> querystring to determine which content to display (so that
>> the site can be properly indexed by search engines).
>> However, I would still like the pages to be .ASPX pages so
>> that certain parts of the page can be dynamic.
>>
>> I did this in the 'old days' using ASP by creating a
>> templating system that generated .asp pages. However, it is
>> not so easy with ASP.NET as the pages obviously need to be
>> compiled. I guess I could still do it and call the command
>> line compiler from my ASP.NET templating code, but this
>> doesn't seem like an ideal solution.
>>
>> Any suggestions would be appreciated.
>>
>> Best regards,
>> Chris
>>
>> Christopher Morse
>> eInfoSystems.net, Inc.
>> www.einfosystems.net <http://www.einfosystems.net/>
>>
>> ===================================
>> This list is hosted by DevelopMentor. http://www.develop.com
>> NEW! ASP.NET courses you may be interested in:
>>
>> Guerrilla ASP.NET, 17 May 2004, in Los Angeles
>> http://www.develop.com/courses/gaspdotnetls
>>
>> View archives and manage your subscription(s) at
>> http://discuss.develop.com
>>
>> ===================================
>> This list is hosted by DevelopMentor(r) http://www.develop.com
>> NEW! ASP.NET courses you may be interested in:
>>
>> Guerrilla ASP.NET, 17 May 2004, in Los Angeles
>> http://www.develop.com/courses/gaspdotnetls
>>
>> View archives and manage your subscription(s) at
>> http://discuss.develop.com
>>
>>
>
>===================================
>This list is hosted by DevelopMentor(r) http://www.develop.com
>NEW! ASP.NET courses you may be interested in:
>
>Guerrilla ASP.NET, 17 May 2004, in Los Angeles
>http://www.develop.com/courses/gaspdotnetls
>
>View archives and manage your subscription(s) at
http://discuss.develop.com
===================================
This list is hosted by DevelopMentor® http://www.develop.com
NEW! ASP.NET courses you may be interested in:
Guerrilla ASP.NET, 17 May 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls
View archives and manage your subscription(s) at http://discuss.develop.com
Next Message by Thread:
click to view message preview
Re: How to Make Dynamic Content Look Like Static Pages?
There are no codebehinds for aspx, no. The ascx in contrast is written
by a developer (not generated by xml/xsl rendering as the aspx is) and
so is free to do whatever it likes.
Your scenario wouldn't be handled by our CMS exactly as you would like
it. The closest we would come is to have actual page1.aspx, page2.aspx,
and page3.aspx.
Those pages would host a custom control called say "ShowArticle" (an
ascx):
<custom:ShowArticle ID="1" runat="server" />
This control would load and show the article.
Cheers,
Paul.
>-----Original Message-----
>From: Discussion of building .NET applications targeted for the Web
>[mailto:DOTNET-WEB@xxxxxxxxxxxxxxxxxxx] On Behalf Of Christopher Morse
>Sent: Tuesday, 24 February 2004 10:27 AM
>To: DOTNET-WEB@xxxxxxxxxxxxxxxxxxx
>Subject: Re: How to Make Dynamic Content Look Like Static Pages?
>
>Hi Paul,
>
>I am afraid I don't understand how your CMS works. What do you mean by
>'flat .aspx'? No code behind?
>
>What I need is a way for my client to be able to enter content
(articles)
>and have them be displayed by a single .aspx page without using a
>querystring to specify which article to display (the content may be
stored
>in xml or in a database...this has not been decided yet). For example,
I
>would like to have links on a page that would point to /page1.aspx,
>/page2.aspx and /page3.aspx. When the user clicks each of the links
(or a
>bot requests them), what is really executed is /showarticle.aspx?ID=1
or
>/showarticle.aspx?ID=2, etc.
>
>Could you explain in a little more detail how your CMS would handle
this?
>
>Thanks,
>Chris
>
>-----Original Message-----
>From: Discussion of building .NET applications targeted for the Web
>[mailto:DOTNET-WEB@xxxxxxxxxxxxxxxxxxx] On Behalf Of Paul Gaske (Public
>Mail)
>Sent: Monday, February 23, 2004 7:00 PM
>To: DOTNET-WEB@xxxxxxxxxxxxxxxxxxx
>Subject: Re: [DOTNET-WEB] How to Make Dynamic Content Look Like Static
>Pages?
>
>We wrote a CMS recently that generates flat .aspx (stored on back-end
in
>xml
>and rendered to aspx prior to deployment to web by xsl). All dynamic
>content is done via "custom controls" - plain old .ascx's. Works well
>because 95% of pages don't need anything custom, and those few pages
>requiring an email form or whatever just get a new .ascx written for
them.
>
>No handlers, no re-writers/isapi/httphandlers, nothing to go wrong.
>Users looking at the page have no way to tell that the page is from a
CMS.
>Neither do crawlers.
>
>Cheers,
>Paul.
>
>>-----Original Message-----
>>From: Discussion of building .NET applications targeted for the Web
>>[mailto:DOTNET-WEB@xxxxxxxxxxxxxxxxxxx] On Behalf Of Thomas Tomiczek
>>Sent: Tuesday, 24 February 2004 7:52 AM
>>To: DOTNET-WEB@xxxxxxxxxxxxxxxxxxx
>>Subject: Re: How to Make Dynamic Content Look Like Static Pages?
>>
>>What about the simple thing that WE do in OUR CMS :-)
>>
>>Run all paths through a handler.
>>
>>Like:
>>
>>/cms.ashx/this/is/a/path.aspx
>>
>>Which is handled by a template we determine. "cms.ashx" is a http
>>handler and gets all the requests. The rest is trivial first hour
>>programming string manipulation:
>>
>>// Step 1: determine the called Url
>>string handlerUrl = request.CurrentExecutionFilePath; string calledUrl
>>= request.RawUrl; int handlerUrlLengh = (calledUrl.Length >
>>handlerUrl.Length) ?
>>handlerUrl.Length+1 : handlerUrl.Length; calledUrl =
>>calledUrl.Substring (handlerUrlLengh);
>>
>>And voila - you intercept all and any request. This is the ONLY way
>that
>>is working, btw., without any change to the metabase, without any
>>ISAPI-Filter-Installation, without anything like this. So it works
with
>>Xcopy-Deployment. And there is no nasty "?" in the querystring
anymore.
>>
>>Easy, isn't it?
>>
>>Thomas Tomiczek
>>
>>
>>> -----Original Message-----
>>> From: Discussion of building .NET applications targeted for the Web
>>> [mailto:DOTNET-WEB@xxxxxxxxxxxxxxxxxxx] On Behalf Of Christopher
>>> Morse
>>> Sent: Montag, 23. Februar 2004 22:34
>>> To: DOTNET-WEB@xxxxxxxxxxxxxxxxxxx
>>> Subject: Re: [DOTNET-WEB] How to Make Dynamic Content Look Like
>>> Static Pages?
>>>
>>> Mark,
>>>
>>> Perfect.
>>>
>>> I pick door number 1...
>>>
>>> This is similar to the only working theory I had previous to your
>>> suggestion, which was to make a custom 404 error page in asp.net
>>> which would basically do the same thing.
>>>
>>> Thank you,
>>> Chris
>>>
>>> -----Original Message-----
>>> From: Discussion of building .NET applications targeted for the Web
>>> [mailto:DOTNET-WEB@xxxxxxxxxxxxxxxxxxx] On Behalf Of Mark W
>>> Sent: Monday, February 23, 2004 3:41 PM
>>> To: DOTNET-WEB@xxxxxxxxxxxxxxxxxxx
>>> Subject: Re: [DOTNET-WEB] How to Make Dynamic Content Look Like
>>> Static Pages?
>>>
>>> Depending on the complexity of your site, you could re-write the
>URLs.
>>> A simple example is here.
>>>
>>> http://www.aspnetpro.com/NewsletterArticle/2003/09/asp200309pj
>>> _l/asp200309pj
>>> _l.asp (or http://snipurl.com/4ogk )
>>>
>>> Alternatively you can write your own httphandler e.g.
>>> http://msdn.microsoft.com/msdnmag/issues/02/08/HTTPFilters/def
>>> ault.aspx
>>> (or http://snipurl.com/4ogp )
>>>
>>>
>>> HTH
>>>
>>> Mark
>>>
>>>
>>> -----Original Message-----
>>> From: Discussion of building .NET applications targeted for the Web
>>> [mailto:DOTNET-WEB@xxxxxxxxxxxxxxxxxxx] On Behalf Of Christopher
>>> Morse
>>> Sent: Tuesday, 24 February 2004 9:28 a.m.
>>> To: DOTNET-WEB@xxxxxxxxxxxxxxxxxxx
>>> Subject: [DOTNET-WEB] How to Make Dynamic Content Look Like Static
>>> Pages?
>>>
>>> Hello All,
>>>
>>> I would like to create a Content Management System for a client in
>>> ASP.NET and I would like to avoid using the querystring to determine
>>> which content to display (so that the site can be properly indexed
by
>>> search engines).
>>> However, I would still like the pages to be .ASPX pages so that
>>> certain parts of the page can be dynamic.
>>>
>>> I did this in the 'old days' using ASP by creating a templating
>>> system that generated .asp pages. However, it is not so easy with
>>> ASP.NET as the pages obviously need to be compiled. I guess I could
>>> still do it and call the command line compiler from my ASP.NET
>>> templating code, but this doesn't seem like an ideal solution.
>>>
>>> Any suggestions would be appreciated.
>>>
>>> Best regards,
>>> Chris
>>>
>>> Christopher Morse
>>> eInfoSystems.net, Inc.
>>> www.einfosystems.net <http://www.einfosystems.net/>
>>>
>>> ===================================
>>> This list is hosted by DevelopMentor. http://www.develop.com NEW!
>>> ASP.NET courses you may be interested in:
>>>
>>> Guerrilla ASP.NET, 17 May 2004, in Los Angeles
>>> http://www.develop.com/courses/gaspdotnetls
>>>
>>> View archives and manage your subscription(s) at
>>> http://discuss.develop.com
>>>
>>> ===================================
>>> This list is hosted by DevelopMentor(r) http://www.develop.com NEW!
>>> ASP.NET courses you may be interested in:
>>>
>>> Guerrilla ASP.NET, 17 May 2004, in Los Angeles
>>> http://www.develop.com/courses/gaspdotnetls
>>>
>>> View archives and manage your subscription(s) at
>>> http://discuss.develop.com
>>>
>>>
>>
>>===================================
>>This list is hosted by DevelopMentor(r) http://www.develop.com NEW!
>>ASP.NET courses you may be interested in:
>>
>>Guerrilla ASP.NET, 17 May 2004, in Los Angeles
>>http://www.develop.com/courses/gaspdotnetls
>>
>>View archives and manage your subscription(s) at
>http://discuss.develop.com
>
>===================================
>This list is hosted by DevelopMentor. http://www.develop.com NEW!
ASP.NET
>courses you may be interested in:
>
>Guerrilla ASP.NET, 17 May 2004, in Los Angeles
>http://www.develop.com/courses/gaspdotnetls
>
>View archives and manage your subscription(s) at
http://discuss.develop.com
>
>===================================
>This list is hosted by DevelopMentor(r) http://www.develop.com
>NEW! ASP.NET courses you may be interested in:
>
>Guerrilla ASP.NET, 17 May 2004, in Los Angeles
>http://www.develop.com/courses/gaspdotnetls
>
>View archives and manage your subscription(s) at
http://discuss.develop.com
===================================
This list is hosted by DevelopMentor® http://www.develop.com
NEW! ASP.NET courses you may be interested in:
Guerrilla ASP.NET, 17 May 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls
View archives and manage your subscription(s) at http://discuss.develop.com
|
|