ASP – An open application environment, it enables powerful server-side scripting.  Home Web Programming ASP Dealing with Requests in ASP
Your Ad Here

Dealing with Requests in ASP


Dealing with Requests in ASPThis tutorial will teach you how to deal with requests in ASP. Requests are often seen in the form of http://www.mysite.com/page.asp?ID=x. THe ID=x is the request in the URL. This tutorial will show you how to change the location of an iFrame using requests in one file.

Part I - ASP

First, we will use name our identifier "ID". If ID=vine, then the iFrame will point to grapevine.asp. If ID=tut, then the iFrame will point to tutorials.asp, and so on:

<%
Dim pageID
Dim iFrame
pageID =  request("ID")

If pageID = "vine" Then
iFrame = "grapevine.asp"
ElseIF pageID = "tut" Then
iFrame = "tutorials.asp"
ElseIf pageID = "contact" Then
iFrame = "contact.asp"
Else
iFrame = "home.asp"
End If
%>


Part II - HTML + IFrame


Now all we need is an iframe to point to and a variable to insert:

<iframe src="/img_articles/4286/<%=iFrame %>" width=200 height=200 />

And thats it! Frame change on request! (pun intended)

Author's URL: Wilfried Schobeiri
Thank you for voting.
Rate this Materials:
Bad 
1 2 3 4 5 Excellent
print this page subscribe to newsletter subscribe to rss

Web programming � everything from the basics of visual design and architecture to the specifics of applications, graphics, and scripting. More Web Programming: Most Popular Materials | Fresh Materials | More ASP Tutorials at LearnPHP.org

Add comments to "Dealing with Requests in ASP"

Only registered users can write comment

No comments yet...