473,473 Members | 1,750 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

.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
Nov 24 '05 #1
2 1605
There are 2 guesses:

1-
if you goto:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFI G
(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
--
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!

"Henry Sun" <pa******@bigpond.net.au> wrote in message
news:%2****************@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

Nov 24 '05 #2
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:
There are 2 guesses:

1-
if you goto:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFI G
(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

Nov 24 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Quentin | last post by:
hey there, ok i made a class, that inherits webcontrol, and i add an htmltable to it. I was wondering how to declare an ascx file as an object in my class, like that i could change the content...
6
by: Quentin | last post by:
I need to import an *;ascx, as an object, in my class, that is in myclass.vb. How can i do ? i saw the method LoadControl but i can't use it, or maybe i did wrong, if could help me it would be very...
2
by: Quentin | last post by:
Hello, I got a Solution, containing two projects, a project of classes, and a web project. The two projects directories are not located in the same place (directory ?). Into my project of...
11
by: Peter Wu | last post by:
Hello, I want to create a Header and Footer for every ASPX page I build. I created 2 Web user controls respectively and placed them in an ASPX page. The problem is that I cannot position the...
4
by: Rob Meade | last post by:
Hi all, I have just put together our organisations 'template' for our web applications and have created 7 .ascx files which when dropped into my template file work perfectly...however, I have a...
1
by: Oleg Ogurok | last post by:
Hi all, In my page class, I'm loading a user control: private void Page_Load(object sender, System.EventArgs e) { Control c = LoadControl("WebUserControl1.ascx"); Controls.AddAt(0, c); }
5
by: djscratchnsniffing | last post by:
i know you can access an ascx's properties/methods from an aspx file. Let's say you have an aspx file with two code-behind files(ascx files). Can you access one of the ascx file's...
0
by: damiensawyer | last post by:
Hello all, I'm very new to all of this. I have a theme and a skin (the standard ones). I have a standard master page which is holding a custom ascx which has a treeview in it. Can someone...
3
by: Steven Nagy | last post by:
Hi all, ASP.NET : Framework 2.0 - C# A recent addition to my code generater will create GridView's and ObjectDataSource's in a control (ASCX). So the code gen creates an ascx, ascx.cs,...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.