CodeAve.com CodeAve.com - ASP - Server Variables
ASP
·Read/Write
·Script Writers
·Database Display
·Response Objects
·Server Variables
·Random Events
·Articles
·Miscellaneous
·Contents
·What's New?
JavaScript
CSS
HTML
Maps
Links
Mail List
Search
Sitemap


 


URL Encode
Stop problems before they start by making sure data input is address bar friendly.  Server.urlencode will take text and convert any special character(s) it finds and convert it to a format that can be use as a valid url.  This example takes output from a db and encodes it into a hyperlink to pull up a unique record.
View the Output
Text View
Print View
Mail this Link
Download the Code
View the Data

<%
accessdb="simpsons" 
cn="DRIVER={Microsoft Access Driver (*.mdb)};"
cn=cn & "DBQ=" & server.mappath(accessdb)
Set rs = Server.CreateObject("ADODB.Recordset")

rs.maxrecords=15

sql = "select * from shows where blackboard is not null" 

rs.Open sql, cn
If rs.eof then
search="nothing"
end if
%>


<%
On Error Resume Next
rs.MoveFirst
do while Not rs.eof
%>
<% blackboard = server.URLencode(rs("blackboard")) %>

<a href="table_querystring.asp?u_blackboard=<%= blackboard %>">
<%= blackboard %>
</a>
<br>
<%
rs.MoveNext
loop%>

 

 

 



ASP: What's New? | Articles | Script Writers | Database Display | Read/Write
Server Variables | Response Objects | Random Events | Miscellaneous
HTML: Forms | Hyperlinks | Headers | Tables | Hyperlinks | Headers | Text Display
JavaScript: Document Info | Forms | Images | Navigation | Script Writers
CSS: Basics | Page Display | Text Display | Script Writers | Miscellaneous
  • 2014 michael kors
  • air max women 2013
  • 2014 michael kors
  • air max 2014
  • oakley glasses
  • oakley glasses

  • Maps: Map Script Writers | Bing Maps | Google Maps
  • bottes fr
  • ugg boot
  • Privacy Statement

    CodeAve.com is hosted by MyHosting.com
    Donate Food Online with a Mouse Click at TheHungerSite.com
    Donate Land Online with a Mouse Click at TheRainForestSite.com
    © 1999 - 2017 CodeAve.com
    All Rights Reserved

  • Kids jordan 6 rings
  • Jordan retro 10
  • Jordan retro 3