»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 04-17-2004, 06:51 PM   #1 (permalink)
Registered User
 
Tekk's Avatar
 
Join Date: Oct 2001
Location: SoCal
Posts: 1,122
Tekk is on a distinguished road
ASP Question...referencing the same ASP page

Ok my teacher is crap and he told us to create a page like this one:

http://hwang.cisdept.csupomona.edu/4.../mylibrary.asp

If you notice, by clicking on the add button, a table appears just below the title bar but the page is the same page just with the ?action=add at the end of the URL.

The dumb dumb teacher didn't really teach us how to do it unless you consider showing us the final product and not even the code learning. In any case, Im thinking that it has something to do with a conditional statement but Im not sure how to exactly implement it in the script. My basic thought process on it is

If action=add Then
.....show the table code here....
Else If action=view Then
.....show nothing for right now....
End If


Would it be a request to figure out if the action=add? IE request("action")=add Then.....

If you could give me a few pointers then that'd be great Dont want the whole thing answered for me outright or else I wouldn't learn anything! thanks a bunch.

__________________
Im very explosive right now...BOOM! Very explosive.
Tekk is offline   Reply With Quote
Old 04-17-2004, 07:10 PM   #2 (permalink)
Registered User
 
golfcart's Avatar
 
Join Date: Oct 2001
Location: Michigan
Posts: 1,680
golfcart is on a distinguished road
It sounds to me like you have the right idea.

action = request.querystring("action")
if action = "add" then
....show table code....
else
....show default page...
end if

I would only use "else if" if the page has some other dynamic function.
golfcart is offline   Reply With Quote
Old 04-18-2004, 01:05 PM   #3 (permalink)
Registered User
 
Tekk's Avatar
 
Join Date: Oct 2001
Location: SoCal
Posts: 1,122
Tekk is on a distinguished road
is response.write(....code here....) the best bet for me to use? or would there be a more usable way of doing it.
__________________
Im very explosive right now...BOOM! Very explosive.
Tekk is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 06:51 PM.