Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Professional
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 31st, 2004, 06:21 AM
Authorized User
 
Join Date: Apr 2004
Location: Lahore, , Pakistan.
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Default why not index.asp?id=1 can be www.myweb.com/?id=1

Hi

i have encounter a problem.

It is working properly:
www.myweb.com/index.asp?id=1

but it is not:
www.myweb.com/?id=1

how to do the second one. I also see in many websites that r using the second one line.

Thanks
Burhan



Reply With Quote
  #2 (permalink)  
Old August 31st, 2004, 07:15 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cochin, Kerala, India.
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

for this, you have to make index.asp as the first default document in the IIS settings.

Open IIS manager.
Rightclick virtual folder and select properties.
Click documents tab.
Add index.asp to default documents list if it is not already there.
Move index.asp up until it becomes the first default document.
save and restart www service.
Reply With Quote
  #3 (permalink)  
Old August 31st, 2004, 08:11 AM
Authorized User
 
Join Date: Apr 2004
Location: Lahore, , Pakistan.
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks madhukp.

Bur problem is that index.asp is already my default page.

when i open this:
localhost/myweb
then it open index.asp

but not doing this:
localhost/myweb/?id=1

what is mistake

thanks
Burhan

Reply With Quote
  #4 (permalink)  
Old August 31st, 2004, 08:55 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cochin, Kerala, India.
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

In the IIS settings, you can have more than one default page in a pre-defined order. For e.g. The default pages may be

default.htm
default.asp
index.htm
index.asp

in that order. Then it will first look for a page default.htm. If it is not available, it will look for default.asp. On the other hand, if it is available, it will show default.htm. Like that it will check for a max of 4 files. If none of above files are there in the folder and if the directory listing is not permitted, it will give a 403 error. (If directory listing is permitted, it will list all files of the directory).

The order of the files in the above list is important for your requirement. That is why I asked you to push index.asp to the top in the list.

[u]Otherwise, you can delete default.htm, default.asp and index.htm files from the folder. This may not be possible if you are using them for some purposes.</u>

Please follow the steps above fully. You may require the help of server admin incase you are using a remote server.
Reply With Quote
  #5 (permalink)  
Old August 31st, 2004, 12:13 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

I didn't know you can do:

/?id=1

I thought it would interpret that incorrectly. Is that wrong?

Brian
Reply With Quote
  #6 (permalink)  
Old August 31st, 2004, 09:17 PM
Friend of Wrox
 
Join Date: Sep 2003
Location: Mentiri, Muara, Brunei.
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

hi,

  Madhu is correct. I tried its working by giving the index.asp as my default page in my website properties.

http://servername/virtualfolderaliasname/?id=1

But you must have index.asp in your folder.

its working fine.

Reply With Quote
  #7 (permalink)  
Old August 31st, 2004, 11:18 PM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cochin, Kerala, India.
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

This feature was there from IIS 5.0 onwards. If pagename is missing, it will assume the querystrings are sent to the default page of the directory.
Reply With Quote
  #8 (permalink)  
Old September 2nd, 2004, 06:53 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

But does that work only for the ROOT of the website or for its subfolders too?

_________________________
- Vijay G
Strive for Perfection
Reply With Quote
  #9 (permalink)  
Old September 2nd, 2004, 11:34 PM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cochin, Kerala, India.
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

This will work for all sub-folders also.
Reply With Quote
  #10 (permalink)  
Old September 3rd, 2004, 01:10 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

AFAIK, the client determines the next page to request.

When a browser requests a folder, a list of "default document" is then returned to the client together with one of the HTTP error codes indicating a folder was requested. The client tries to request the first document, and then the next if the first didn't exist and so on.

So /?id=1 would actually end up as Default.asp?id=1 once the browser has requested the page.

I could be completely wrong about this, so don't take my word on this, but this is how I think it works.....

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP Add New Record and Get ID omninewt Classic ASP Databases 5 April 10th, 2008 12:20 PM
Passing asp control id to javascript jazzcatone ASP.NET 1.0 and 1.1 Professional 0 October 18th, 2006 01:38 PM
'this.ID = id;' in class construction holf BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 October 6th, 2006 10:58 AM
Get the Id of Control in ASP rekha_jsr Classic ASP Professional 2 June 14th, 2006 07:37 AM
ASP Insert - Get Record ID llowe Classic ASP Databases 2 March 24th, 2004 11:11 AM



All times are GMT -4. The time now is 04:02 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.