Learnthat.com Free Certification and Computer Online Courses
ThatNetwork.com Internet Media Network Givethat.com free gift ideas Definethat.com - Free technical definitions, define Free Romance Tips, Romantic Tips, Date Ideas Free POD publisher comparison print on demand
Learnthat.com Free A+ Certification, Computer Classes, Certification Courses, Business, Lifestyle, ApplicationsFree business tutorials and definitionsFree certification tutorials and definitionsFree computer and technical tutorials and technical definitionsFree Finance Tutorials and DefinitionsFree House Repair TutorialsFree Lifestyle and Fun Tutorials
  All Online CoursesNew Courses QuickTipsWord DefinitionsSubmit a TutorialLinks
÷ Resources
Home
free tech tutorials
Free Tutorials
free tech tutorials
Certifications
free tech tutorials
Definitions
free tech tutorials
Resources/Links
free tech tutorials
Forums
free tech tutorials
Distance Education
free tech tutorials
Highest Rated Tutorials
÷ Popular Tutorials
÷ New Tutorials

Active Server Pages (ASP)

 

Encoding a URL

Because a browser can misinterpret spaces and special characters in a URL (as when, for example, a query string is passed), you should use the Server.URLEncode statement to encode a URL being passed from one page to another:

<HTML>

<BODY>

<%

Dim FavoriteURL

FavoriteURL=Request.Form("txtFavURL")

%>

Click the link below to visit your favorite URL:<BR>

<a href=<%=Server.URLEncode("FavoriteURL")%>><%=FavoriteURL%></a>

</BODY>

</HTML>

In the code above, a user's entry for a favorite URL is requested from a from on another page and displayed as a hyperlink on the current page. While the text for the hyperlink appears as the user entered it, the actual hyperlink is encoded to be interpreted correctly by the browser.

Mapping Server File Paths

You use the Server.MapPath statement to return the physical path for a file on the server. To return the path of the server's root directory, include a slash (/) or a backslash (\):

<HTML>

<BODY>

<%Response.Write(Server.MapPath("/"))%><BR>

<%Response.Write(Server.MapPath("SendData.asp"))%>

</BODY>

</HTML>

 

 

by Summer Doucet

Find more free Internet tutorials from Learnthat.com.

More Information:

Help us by rating this tutorial: [---] [--] [+] [++] [+++]
[---] lowest; [+++] highest

 

 

 


Learn: Free Tutorials - Links to Free Tutorials
Understand: Free Technical Definitions - ExplainThat Whitepapers
Use: Certification Section - Discussion Forum

Visit Our Network Sites:

DefineThat.com Technical Defintions Romancetips.com
Free Gift Ideas - GiveThat Planthat.com Free Unique Business Ideas
PublishOnDemand.net - Learn about Print on Demand (POD) - Self Publishing Seekthat.com - Technical Search Engine
ThatNetwork.com  

About Us : Contact Us : Advertise : Privacy Information

© 1998-2004 Learnthat.com