Wrox Programmer Forums
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 10th, 2008, 09:35 AM
Registered User
 
Join Date: Feb 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Temporary Web Page problem

I have question about Temporary Web Page.
When I click on link in my web application and redirect to ( for example)
mywebsite.com/12.aspx.
When event OnLoad() fire,I read value 12, which is Primary key and make query to the database,get record and represent on web page.
But,I need temporary web page with a address mywebsite.com/mynumber.aspx.
or whatever,where I can read value of mynumber ,make query and represents data to web page.
Is there any idea how can I solve this problem.
Thanks in advance
David
 
Old February 11th, 2008, 01:36 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You need to look into the concept called "URL Re-writing".

Because of the way that IIS behaves you typically handle this with some configuration settings in the web.config and create "virtual" URLs that your application handles. Typically, you create a page name that specifies the functionality you want and you parse the URL to get the data that would normally be in querystring parameters. So you could have a URL like this:

    mywebsite.com/12/DoSomething.aspx

You translate this into a real URL to some page with 12 as the querystring parameter. I haven't do this kind of stuff myself so my suggestions might not be entirely correct, but that's the general idea. I've seen several tutorials and articles about this online so you shouldn't have much problem finding a detailed explanation.

A general search will likely bring back lots of results that apply to other web servers so try a search on searchdotnet.com for .NET specific results.

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
how to prevent a web page/window page from copying pradeeppatnaik81 C# 2 April 9th, 2008 03:36 AM
How to diplay web page inside another web page win cyberjoe C# 2 March 1st, 2007 05:35 AM
problem in printing a web page at runtime Abhinav_jain_mca General .NET 1 July 30th, 2004 10:05 PM
How to format web page to a printable page? peter2004 HTML Code Clinic 2 May 3rd, 2004 01:34 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.