Address bar

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

Hi

I have a default.aspx page that will be loaded when user hit the / of my application root folder. In the page I have hyperlinks
that will bring users to other pages. I would like to know how should I change my default.aspx page to make the address shown on
the address bar remains unchanged but the page will actually display other pages. In the old days of HTML, I could use frames to
create different frames to allow those new pages to be displayed on but this seems kind of dump using frames nowadays. Any easier
way in asp.net to archieve this ?

Thanks in advance.
Peter
 
Hi,

This is not directly related to ASP.NET.

The thing is that URLs are supposed to identify pages. You users most
likely want to be able to see an URL that later can be used to get the
page they are actually seeing.

Another thing is that the web server can't just tell what page you want
to display so I will have to use one or more of file names, path info,
query string, posted data.

You can on the other hand hide all the above from the main address by
using frames, iframes (or other container objects) or AJAX to
dynamically load content to the page.

Note that POST usually results in making the back button of the browser
unusable because the browser wants to repost the data.

AJAX on the other hand does not support back button at all.

I would strongly recommend you to use distinct URLs for each page and
your users will like that. If you want some cool looking URLs, use file
names with no extensions or your own extension.

Kornél
 
Hi

I have a default.aspx page that will be loaded when user hit the / of
my application root folder. In the page I have hyperlinks that will
bring users to other pages. I would like to know how should I change
my default.aspx page to make the address shown on the address bar
remains unchanged but the page will actually display other pages. In
the old days of HTML, I could use frames to create different frames to
allow those new pages to be displayed on but this seems kind of dump
using frames nowadays. Any easier way in asp.net to archieve this ?


There are numerous ways to solve this, depending on your needs. Frames
are one. Running your links through a page that server redirects is
another, but it is very crude. If you are in the ASP>NET 3.5 age, you
can get the URL re-routing bits (SP1) and use rerouting to hide the
actual page.

Realistically, the page showing up should not matter if your security is
configured correctly. What I mean here is you should be authenticating
users when they hit the page. If hiding is your method of securing a
resource, someone will hack it (trust me on this one).


--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
Back
Top