Address bar

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
 
K

Kornél Pál

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
 
G

Gregory A. Beamer

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).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top