Home All Groups Group Topic Archive Search About

.ascx file as index page?

Author
24 Nov 2005 9:47 AM
Henry Sun
Hi all,

New to ASP.NET and this Newsgroup. recently I saw some major websites
use ascx page as their index page (e.g. index.ascx?ProductId=blah). I
did a little bit rearch but I still couldn't find any word about this...
  My question is How does it work? What's benefit of this? Was that some
kind of templet?

Thank you in advance

Henry

Author
24 Nov 2005 12:49 PM
Karl Seguin
There are 2 guesses:

1-
if you goto:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG
(winnt on 2000, and possible a different version number)

and open up machine.config (don't mess with it unless you know what are you
are doing), do a search for PageHandlerFactory  and you'll see how asp.net
internally maps an extension to an HttpHandler.

There'd be no advantage to this method other thanbeing cool.  Their ascx
would still need to inherit from Page and be like your normal Page

2-
They are using UrlRewriting, so while it looks like it's going to
index.ascx?asds=asd  it's really going to another page(say index.aspx).  For
this to work, they'd again need to remove .ascx as a "HttpForbiddenHandler"
in the web.config and really wouldn't be how I'd recommend they do whatever
they are trying to do..

Karl
Show quoteHide quote
"Henry Sun" <party***@bigpond.net.au> wrote in message
news:%23FTHAzN8FHA.2040@TK2MSFTNGP14.phx.gbl...
> Hi all,
>
> New to ASP.NET and this Newsgroup. recently I saw some major websites use
> ascx page as their index page (e.g. index.ascx?ProductId=blah). I did a
> little bit rearch but I still couldn't find any word about this... My
> question is How does it work? What's benefit of this? Was that some kind
> of templet?
>
> Thank you in advance
>
> Henry
Are all your drivers up to date? click for free checkup

Author
24 Nov 2005 1:04 PM
Henry Sun
Hi Karl,

Thank you very much for your explanation! I am learning how to build
enterprise website using asp.net, so I thought I might just found a
standard way (or some sort of templet) while I saw it... so there isn't
much benefit by using .ascx file as a index page at all :(

Thank you again for clarify that :)

Henry


Karl Seguin wrote:
Show quoteHide quote
> There are 2 guesses:
>
> 1-
> if you goto:
> C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG
> (winnt on 2000, and possible a different version number)
>
> and open up machine.config (don't mess with it unless you know what are you
> are doing), do a search for PageHandlerFactory  and you'll see how asp.net
> internally maps an extension to an HttpHandler.
>
> There'd be no advantage to this method other thanbeing cool.  Their ascx
> would still need to inherit from Page and be like your normal Page
>
> 2-
> They are using UrlRewriting, so while it looks like it's going to
> index.ascx?asds=asd  it's really going to another page(say index.aspx).  For
> this to work, they'd again need to remove .ascx as a "HttpForbiddenHandler"
> in the web.config and really wouldn't be how I'd recommend they do whatever
> they are trying to do..
>
> Karl

Bookmark and Share