|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
.ascx file as index page?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 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 quoteMY ASP.Net tutorials http://www.openmymind.net/ http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX! "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 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
Other interesting topics
Can't edit, delete or add row in an Access database in a website 2
must use updateable query request specific holding location.... GredView {0:d} formatting doesn't work Event 1089 How to add Label control to DataList? Dynamically Loading the User Control and Passing Parameters to it. Horizontal CSS drop-down menu? Fail to save xmldocument ASP.NET 2.0 base64 encryption |
|||||||||||||||||||||||