473,287 Members | 1,643 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

Hide ASPX Extension

Does anyone know how to hide the ASPX extension of web pages in ASP.Net 2.0?

Thanks,

Matt
May 19 '06 #1
13 4462
You can't hide it. You can, however, configure the ASP.Net ISAPI to use a
different extension, through IIS.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

The man who questions opinions is wise.
The man who quarrels with facts is a fool.

"Matt" <md*****@sorvive.DONT-SEND-SPAM.com> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Does anyone know how to hide the ASPX extension of web pages in ASP.Net 2.0?

Thanks,

Matt

May 19 '06 #2
configure iis to have all requests ( * ) handled by asp.net
configure the appropriate static resource handlers in your web.config - ..gif , .js , .css etc
in Application_BeginRequest use url rewriting to send the remaining requests to the proper handler

ie
requests for http://www.mysite.com sent to default.aspx
requests for http://www.mysite.com/products sent to products.aspx
requests for http://www.mysite.com/support sent to support.aspx
....
Gerry

"Matt" <md*****@sorvive.DONT-SEND-SPAM.com> wrote in message news:%2****************@TK2MSFTNGP02.phx.gbl...
Does anyone know how to hide the ASPX extension of web pages in ASP.Net 2.0?

Thanks,

Matt
May 20 '06 #3
Gerry,

Here is the problem I am having. I can hide the and manipulate the extension with a HTTPHandler on the post but once the process makes a roundtrip ASP.NET automatically sets the action="page.aspx" in a form and on the response the browser now displays the full filename with extension because it expects to post to itself, which it has to.

Am I missing something here with how Request/Response is working with web forms?

Thanks,

Matt
"gerry" <ge**@nospam.nospam> wrote in message news:Oq**************@TK2MSFTNGP04.phx.gbl...
configure iis to have all requests ( * ) handled by asp.net
configure the appropriate static resource handlers in your web.config - .gif , .js , .css etc
in Application_BeginRequest use url rewriting to send the remaining requests to the proper handler

ie
requests for http://www.mysite.com sent to default.aspx
requests for http://www.mysite.com/products sent to products.aspx
requests for http://www.mysite.com/support sent to support.aspx
...
Gerry

"Matt" <md*****@sorvive.DONT-SEND-SPAM.com> wrote in message news:%2****************@TK2MSFTNGP02.phx.gbl...
Does anyone know how to hide the ASPX extension of web pages in ASP.Net 2.0?

Thanks,

Matt
May 20 '06 #4
sorry - i forgot about that ,
one way to handle this is via a response filter ( HttpModule ) something along the lines of this :

- in your page's <head> section add :
<FormAction runat="Server" id="FormAction" href="" />

- somewhere during the page processing set the FormAction href value something like this :
FormAction.Attributes["href"] = Request.HttpMethod=="POST" ? Request.Headers["Referer"] : Request.RawUrl;

- in your response filter :
use regex to pull out the FormAction href value
use regex to delete the FormAction tag
use regex to replace the <form> action value

To see this in action look at www.hgha.ca - you will see that all pages have the .htm extension but in fact there exists only one single .aspx page that handles all .htm requests. Ya I know - it looks kindof rough in spots but thats because the users 'compose' most of the content online themselves

Gerry

"Matt" <md*****@sorvive.DONT-SEND-SPAM.com> wrote in message news:ug****************@TK2MSFTNGP02.phx.gbl...
Gerry,

Here is the problem I am having. I can hide the and manipulate the extension with a HTTPHandler on the post but once the process makes a roundtrip ASP.NET automatically sets the action="page.aspx" in a form and on the response the browser now displays the full filename with extension because it expects to post to itself, which it has to.

Am I missing something here with how Request/Response is working with web forms?

Thanks,

Matt
"gerry" <ge**@nospam.nospam> wrote in message news:Oq**************@TK2MSFTNGP04.phx.gbl...
configure iis to have all requests ( * ) handled by asp.net
configure the appropriate static resource handlers in your web.config - .gif , .js , .css etc
in Application_BeginRequest use url rewriting to send the remaining requests to the proper handler

ie
requests for http://www.mysite.com sent to default.aspx
requests for http://www.mysite.com/products sent to products.aspx
requests for http://www.mysite.com/support sent to support.aspx
...
Gerry

"Matt" <md*****@sorvive.DONT-SEND-SPAM.com> wrote in message news:%2****************@TK2MSFTNGP02.phx.gbl...
Does anyone know how to hide the ASPX extension of web pages in ASP.Net 2.0?

Thanks,

Matt
May 20 '06 #5
If you do that, I fear your site's throughput will sink.

What you are suggesting would increase the site's processing by at least 2-300%
which would reduce your site's throughput to 33% or 25% of what it should handle.

For what ? For an esthetic "hide my extension" consideration ?

Thanks, but no thanks.

I value ASP.NET for its processing capability, which allows me to have much
more throughput than comparable platforms...with a lot less programming effort.

Hobbling my web server to satisfy an esthetic desire is pointless, imho.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"gerry" <ge**@nospam.nospam> wrote in message news:Oq**************@TK2MSFTNGP04.phx.gbl...
configure iis to have all requests ( * ) handled by asp.net
configure the appropriate static resource handlers in your web.config - .gif , .js , .css etc
in Application_BeginRequest use url rewriting to send the remaining requests to the proper handler

ie
requests for http://www.mysite.com sent to default.aspx
requests for http://www.mysite.com/products sent to products.aspx
requests for http://www.mysite.com/support sent to support.aspx
....
Gerry

"Matt" <md*****@sorvive.DONT-SEND-SPAM.com> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Does anyone know how to hide the ASPX extension of web pages in ASP.Net 2.0?

Thanks,

Matt

May 20 '06 #6
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:er****************@TK2MSFTNGP02.phx.gbl...
Hobbling my web server to satisfy an esthetic desire is pointless, imho.


I couldn't agree more!
May 20 '06 #7
sure - but that wasn't the question being asked.
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:er****************@TK2MSFTNGP02.phx.gbl...
If you do that, I fear your site's throughput will sink.

What you are suggesting would increase the site's processing by at least 2-300% which would reduce your site's throughput to 33% or 25% of what it should handle.
For what ? For an esthetic "hide my extension" consideration ?

Thanks, but no thanks.

I value ASP.NET for its processing capability, which allows me to have much more throughput than comparable platforms...with a lot less programming effort.
Hobbling my web server to satisfy an esthetic desire is pointless, imho.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"gerry" <ge**@nospam.nospam> wrote in message news:Oq**************@TK2MSFTNGP04.phx.gbl... configure iis to have all requests ( * ) handled by asp.net
configure the appropriate static resource handlers in your web.config - ..gif , .js , .css etc in Application_BeginRequest use url rewriting to send the remaining requests to the proper handler
ie
requests for http://www.mysite.com sent to default.aspx
requests for http://www.mysite.com/products sent to products.aspx
requests for http://www.mysite.com/support sent to support.aspx
...
Gerry

"Matt" <md*****@sorvive.DONT-SEND-SPAM.com> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Does anyone know how to hide the ASPX extension of web pages in ASP.Net 2.0?
Thanks,

Matt

May 21 '06 #8
Gerry,

inherent to *every* question is the underlying metainfo
as to whether the answer sought is convenient or not.

That saves a lot of barking up the wrong trees,
and warns all readers about the pitfalls in proposed code.

In this case, implementing what you proposed would increase the server workload
by a large factor, reducing the throughput for the server where that "solution" is implemented.

Sorry, nothing personal, but the proposed answer,
though technically correct, is worthless as a solution.

In any case, it's much simpler to hide the aspx extension by using a frameset in which
the first frame has zero for its number of rows and all the content is written in the
second frame, with * specified in the default frameset for the number of its rows.

That will, effectively, hide the extension for the default page but won't overload the server.
All other pages are exposed as links which have the 2nd frame as their target.

This is an old HTML trick to hide page extensions, although it has nothing to do with ASP.NET.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"gerry" <ge**@nospam.nospam> wrote in message news:e4**************@TK2MSFTNGP02.phx.gbl...
sure - but that wasn't the question being asked.
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:er****************@TK2MSFTNGP02.phx.gbl...
If you do that, I fear your site's throughput will sink.

What you are suggesting would increase the site's processing by at least

2-300%
which would reduce your site's throughput to 33% or 25% of what it should

handle.

For what ? For an esthetic "hide my extension" consideration ?

Thanks, but no thanks.

I value ASP.NET for its processing capability, which allows me to have

much
more throughput than comparable platforms...with a lot less programming

effort.

Hobbling my web server to satisfy an esthetic desire is pointless, imho.
Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"gerry" <ge**@nospam.nospam> wrote in message

news:Oq**************@TK2MSFTNGP04.phx.gbl...
configure iis to have all requests ( * ) handled by asp.net
configure the appropriate static resource handlers in your web.config -

.gif , .js , .css etc
in Application_BeginRequest use url rewriting to send the remaining

requests to the proper handler

ie
requests for http://www.mysite.com sent to default.aspx
requests for http://www.mysite.com/products sent to products.aspx
requests for http://www.mysite.com/support sent to support.aspx
...
Gerry "Matt" <md*****@sorvive.DONT-SEND-SPAM.com> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Does anyone know how to hide the ASPX extension of web pages in ASP.Net

2.0?

Thanks,

Matt

May 21 '06 #9
How about this, if I can't do this then I loose a 500K contract, is that underlying issue good enough to require the hiding of an extension!
"gerry" <ge**@nospam.nospam> wrote in message news:Oq**************@TK2MSFTNGP04.phx.gbl...
configure iis to have all requests ( * ) handled by asp.net
configure the appropriate static resource handlers in your web.config - .gif , .js , .css etc
in Application_BeginRequest use url rewriting to send the remaining requests to the proper handler

ie
requests for http://www.mysite.com sent to default.aspx
requests for http://www.mysite.com/products sent to products.aspx
requests for http://www.mysite.com/support sent to support.aspx
...
Gerry

"Matt" <md*****@sorvive.DONT-SEND-SPAM.com> wrote in message news:%2****************@TK2MSFTNGP02.phx.gbl...
Does anyone know how to hide the ASPX extension of web pages in ASP.Net 2.0?

Thanks,

Matt
May 21 '06 #10
Juan,

I have never heard of this method nor ever seen it implemented. Where can I find more information about it's use and how to implement it?

Thanks,

Matt
"Juan T. Llibre" <no***********@nowhere.com> wrote in message news:Ov**************@TK2MSFTNGP04.phx.gbl...
Gerry,

inherent to *every* question is the underlying metainfo
as to whether the answer sought is convenient or not.

That saves a lot of barking up the wrong trees,
and warns all readers about the pitfalls in proposed code.

In this case, implementing what you proposed would increase the server workload
by a large factor, reducing the throughput for the server where that "solution" is implemented.

Sorry, nothing personal, but the proposed answer,
though technically correct, is worthless as a solution.

In any case, it's much simpler to hide the aspx extension by using a frameset in which
the first frame has zero for its number of rows and all the content is written in the
second frame, with * specified in the default frameset for the number of its rows.

That will, effectively, hide the extension for the default page but won't overload the server.
All other pages are exposed as links which have the 2nd frame as their target.

This is an old HTML trick to hide page extensions, although it has nothing to do with ASP.NET.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"gerry" <ge**@nospam.nospam> wrote in message news:e4**************@TK2MSFTNGP02.phx.gbl...
sure - but that wasn't the question being asked.
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:er****************@TK2MSFTNGP02.phx.gbl...
If you do that, I fear your site's throughput will sink.

What you are suggesting would increase the site's processing by at least

2-300%
which would reduce your site's throughput to 33% or 25% of what it should

handle.

For what ? For an esthetic "hide my extension" consideration ?

Thanks, but no thanks.

I value ASP.NET for its processing capability, which allows me to have

much
more throughput than comparable platforms...with a lot less programming

effort.

Hobbling my web server to satisfy an esthetic desire is pointless, imho.
Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"gerry" <ge**@nospam.nospam> wrote in message

news:Oq**************@TK2MSFTNGP04.phx.gbl...
configure iis to have all requests ( * ) handled by asp.net
configure the appropriate static resource handlers in your web.config -

.gif , .js , .css etc
in Application_BeginRequest use url rewriting to send the remaining

requests to the proper handler

ie
requests for http://www.mysite.com sent to default.aspx
requests for http://www.mysite.com/products sent to products.aspx
requests for http://www.mysite.com/support sent to support.aspx
...
Gerry "Matt" <md*****@sorvive.DONT-SEND-SPAM.com> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Does anyone know how to hide the ASPX extension of web pages in ASP.Net

2.0?

Thanks,

Matt

May 21 '06 #11
re:
I have never heard of this method nor ever seen it implemented.
Where can I find more information about it's use and how to implement it?
That method not only hides the extension, it hides the whole filename!

It's quite simple :

default.aspx :
=========
<html>
<head>
<title>Main</title>
</head>
<frameset rows="0,*">
<frame name="a" scrolling="no" noresize="noresize" target="main" src="a.aspx">
<frameset cols="*">
<frame name="main" src="main.aspx">
</frameset>
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</frameset>
</html>
======

main.aspx :
========
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Frameset</title>
</head>
<body>
<a href="someother.aspx" target="main">Some other ASPX page</a>
</body>
</html>
=======

That's it!

You can place links to any *.aspx page in main.aspx, and they will be displayed
in the "main" frame without the filename being displayed in the browser!

You'll probably need to include some sort of navigation menu in all the pages linked to in
main.aspx.
You'll also need to include Page and Language directives if you need them.

That shouldn't be too hard of a job...


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Matt" <md*****@sorvive.DONT-SEND-SPAM.com> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Juan,

I have never heard of this method nor ever seen it implemented. Where can I find more information
about it's use and how to implement it?

Thanks,

Matt
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:Ov**************@TK2MSFTNGP04.phx.gbl...
Gerry,

inherent to *every* question is the underlying metainfo
as to whether the answer sought is convenient or not.

That saves a lot of barking up the wrong trees,
and warns all readers about the pitfalls in proposed code.

In this case, implementing what you proposed would increase the server workload
by a large factor, reducing the throughput for the server where that "solution" is implemented.

Sorry, nothing personal, but the proposed answer,
though technically correct, is worthless as a solution.

In any case, it's much simpler to hide the aspx extension by using a frameset in which
the first frame has zero for its number of rows and all the content is written in the
second frame, with * specified in the default frameset for the number of its rows.

That will, effectively, hide the extension for the default page but won't overload the server.
All other pages are exposed as links which have the 2nd frame as their target.

This is an old HTML trick to hide page extensions, although it has nothing to do with ASP.NET.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"gerry" <ge**@nospam.nospam> wrote in message news:e4**************@TK2MSFTNGP02.phx.gbl... sure - but that wasn't the question being asked.
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:er****************@TK2MSFTNGP02.phx.gbl...
If you do that, I fear your site's throughput will sink.

What you are suggesting would increase the site's processing by at least

2-300%
which would reduce your site's throughput to 33% or 25% of what it should

handle.

For what ? For an esthetic "hide my extension" consideration ?

Thanks, but no thanks.

I value ASP.NET for its processing capability, which allows me to have

much
more throughput than comparable platforms...with a lot less programming

effort.

Hobbling my web server to satisfy an esthetic desire is pointless, imho.
Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"gerry" <ge**@nospam.nospam> wrote in message

news:Oq**************@TK2MSFTNGP04.phx.gbl...
configure iis to have all requests ( * ) handled by asp.net
configure the appropriate static resource handlers in your web.config -

.gif , .js , .css etc
in Application_BeginRequest use url rewriting to send the remaining

requests to the proper handler

ie
requests for http://www.mysite.com sent to default.aspx
requests for http://www.mysite.com/products sent to products.aspx
requests for http://www.mysite.com/support sent to support.aspx
...
Gerry "Matt" <md*****@sorvive.DONT-SEND-SPAM.com> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Does anyone know how to hide the ASPX extension of web pages in ASP.Net

2.0?

Thanks,

Matt


May 21 '06 #12
Jaun,

Thanks a bunch! I will definitely look into doing this. Do you know if using master pages with this methods would cause any issues?

Thanks again,

Matt
"Juan T. Llibre" <no***********@nowhere.com> wrote in message news:uR**************@TK2MSFTNGP04.phx.gbl...
re:
I have never heard of this method nor ever seen it implemented.
Where can I find more information about it's use and how to implement it?
That method not only hides the extension, it hides the whole filename!

It's quite simple :

default.aspx :
=========
<html>
<head>
<title>Main</title>
</head>
<frameset rows="0,*">
<frame name="a" scrolling="no" noresize="noresize" target="main" src="a.aspx">
<frameset cols="*">
<frame name="main" src="main.aspx">
</frameset>
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</frameset>
</html>
======

main.aspx :
========
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Frameset</title>
</head>
<body>
<a href="someother.aspx" target="main">Some other ASPX page</a>
</body>
</html>
=======

That's it!

You can place links to any *.aspx page in main.aspx, and they will be displayed
in the "main" frame without the filename being displayed in the browser!

You'll probably need to include some sort of navigation menu in all the pages linked to in
main.aspx.
You'll also need to include Page and Language directives if you need them.

That shouldn't be too hard of a job...


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Matt" <md*****@sorvive.DONT-SEND-SPAM.com> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Juan,

I have never heard of this method nor ever seen it implemented. Where can I find more information
about it's use and how to implement it?

Thanks,

Matt
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:Ov**************@TK2MSFTNGP04.phx.gbl...
Gerry,

inherent to *every* question is the underlying metainfo
as to whether the answer sought is convenient or not.

That saves a lot of barking up the wrong trees,
and warns all readers about the pitfalls in proposed code.

In this case, implementing what you proposed would increase the server workload
by a large factor, reducing the throughput for the server where that "solution" is implemented.

Sorry, nothing personal, but the proposed answer,
though technically correct, is worthless as a solution.

In any case, it's much simpler to hide the aspx extension by using a frameset in which
the first frame has zero for its number of rows and all the content is written in the
second frame, with * specified in the default frameset for the number of its rows.

That will, effectively, hide the extension for the default page but won't overload the server.
All other pages are exposed as links which have the 2nd frame as their target.

This is an old HTML trick to hide page extensions, although it has nothing to do with ASP.NET.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"gerry" <ge**@nospam.nospam> wrote in message news:e4**************@TK2MSFTNGP02.phx.gbl... sure - but that wasn't the question being asked.
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:er****************@TK2MSFTNGP02.phx.gbl...
If you do that, I fear your site's throughput will sink.

What you are suggesting would increase the site's processing by at least

2-300%
which would reduce your site's throughput to 33% or 25% of what it should

handle.

For what ? For an esthetic "hide my extension" consideration ?

Thanks, but no thanks.

I value ASP.NET for its processing capability, which allows me to have

much
more throughput than comparable platforms...with a lot less programming

effort.

Hobbling my web server to satisfy an esthetic desire is pointless, imho.
Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"gerry" <ge**@nospam.nospam> wrote in message

news:Oq**************@TK2MSFTNGP04.phx.gbl...
configure iis to have all requests ( * ) handled by asp.net
configure the appropriate static resource handlers in your web.config -

.gif , .js , .css etc
in Application_BeginRequest use url rewriting to send the remaining

requests to the proper handler

ie
requests for http://www.mysite.com sent to default.aspx
requests for http://www.mysite.com/products sent to products.aspx
requests for http://www.mysite.com/support sent to support.aspx
...
Gerry "Matt" <md*****@sorvive.DONT-SEND-SPAM.com> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Does anyone know how to hide the ASPX extension of web pages in ASP.Net

2.0?

Thanks,

Matt


May 21 '06 #13
re:
Do you know if using master pages with this methods would cause any issues?
You can't have it all, Matt.

Master Pages and Frames serve, basically, the same purpose.
It's one or the other.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Matt" <md*****@sorvive.DONT-SEND-SPAM.com> wrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Juan,

Thanks a bunch! I will definitely look into doing this. Do you know if using master pages with
this methods would cause any issues?

Thanks again,

Matt
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:uR**************@TK2MSFTNGP04.phx.gbl...
re: I have never heard of this method nor ever seen it implemented.
Where can I find more information about it's use and how to implement it?
That method not only hides the extension, it hides the whole filename!

It's quite simple :

default.aspx :
=========
<html>
<head>
<title>Main</title>
</head>
<frameset rows="0,*">
<frame name="a" scrolling="no" noresize="noresize" target="main" src="a.aspx">
<frameset cols="*">
<frame name="main" src="main.aspx">
</frameset>
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</frameset>
</html>
======

main.aspx :
========
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Frameset</title>
</head>
<body>
<a href="someother.aspx" target="main">Some other ASPX page</a>
</body>
</html>
=======

That's it!

You can place links to any *.aspx page in main.aspx, and they will be displayed
in the "main" frame without the filename being displayed in the browser!

You'll probably need to include some sort of navigation menu in all the pages linked to in
main.aspx.
You'll also need to include Page and Language directives if you need them.

That shouldn't be too hard of a job...


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Matt" <md*****@sorvive.DONT-SEND-SPAM.com> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Juan,

I have never heard of this method nor ever seen it implemented. Where can I find more information
about it's use and how to implement it?

Thanks,

Matt
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:Ov**************@TK2MSFTNGP04.phx.gbl...
Gerry,

inherent to *every* question is the underlying metainfo
as to whether the answer sought is convenient or not.

That saves a lot of barking up the wrong trees,
and warns all readers about the pitfalls in proposed code.

In this case, implementing what you proposed would increase the server workload
by a large factor, reducing the throughput for the server where that "solution" is implemented.

Sorry, nothing personal, but the proposed answer,
though technically correct, is worthless as a solution.

In any case, it's much simpler to hide the aspx extension by using a frameset in which
the first frame has zero for its number of rows and all the content is written in the
second frame, with * specified in the default frameset for the number of its rows.

That will, effectively, hide the extension for the default page but won't overload the server.
All other pages are exposed as links which have the 2nd frame as their target.

This is an old HTML trick to hide page extensions, although it has nothing to do with ASP.NET.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"gerry" <ge**@nospam.nospam> wrote in message news:e4**************@TK2MSFTNGP02.phx.gbl... sure - but that wasn't the question being asked.
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:er****************@TK2MSFTNGP02.phx.gbl...
If you do that, I fear your site's throughput will sink.

What you are suggesting would increase the site's processing by at least

2-300%
which would reduce your site's throughput to 33% or 25% of what it should

handle.

For what ? For an esthetic "hide my extension" consideration ?

Thanks, but no thanks.

I value ASP.NET for its processing capability, which allows me to have

much
more throughput than comparable platforms...with a lot less programming

effort.

Hobbling my web server to satisfy an esthetic desire is pointless, imho.
Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"gerry" <ge**@nospam.nospam> wrote in message

news:Oq**************@TK2MSFTNGP04.phx.gbl...
configure iis to have all requests ( * ) handled by asp.net
configure the appropriate static resource handlers in your web.config -

.gif , .js , .css etc
in Application_BeginRequest use url rewriting to send the remaining

requests to the proper handler

ie
requests for http://www.mysite.com sent to default.aspx
requests for http://www.mysite.com/products sent to products.aspx
requests for http://www.mysite.com/support sent to support.aspx
...
Gerry "Matt" <md*****@sorvive.DONT-SEND-SPAM.com> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Does anyone know how to hide the ASPX extension of web pages in ASP.Net

2.0?

Thanks,

Matt



May 21 '06 #14

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

Similar topics

7
by: Shaul Feldman | last post by:
Hello, the question is how can I masquerade ASPX files behind HTML extension? Thank you in advance. -- With the best wishes, Shaul Feldman
3
by: Christopher Baldwin | last post by:
Hello, Using ASP.NET v2.0.40607.42, I'm attempting to create a new file extension that should be handled exactly like "aspx" pages. For example, I just want to rename an aspx page from...
9
by: Rena | last post by:
Hi all, I would like to know if there are any way to hide the xxxx.aspx on my URL on server-side to avoid anonymous knowing i am using ASP. Net ? Thanks a lot.
2
by: hn | last post by:
Hi, Is it possible to hide the aspx extension in the URL displayed on the address bar?
5
by: Matt | last post by:
I currently have a client that is okay with us using Microsoft development products but do not want their customers to see the aspx extension on any of the web pages. I played around with creating...
24
by: John Rivers | last post by:
ASPX which means ASPX pages, the code-behind concept, User Controls, Web Controls etc. is very poorly designed and makes it extremely hard to develop professional quality web applications. ASPX...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.