April 22, 2018

GetString() in ASP

How to use GET Scring in ASP to show content - ASP scripts and Tutorials

Multiple Response.Write’s

<body>

<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/webdata/yourdb.mdb"

set rs = Server.CreateObject("ADODB.recordset")
rs.Open "SELECT Companyname, Contactname FROM Customers", conn
%>

<table border="1" width="100%">
<%do until rs.EOF%>
  <tr>
    <td><%Response.Write(rs.fields("Companyname"))%></td>
    <td><%Response.Write(rs.fields("Contactname"))%></td>
  </tr>
<%rs.MoveNext
loop%>
</table>

<%
rs.close
conn.close
set rs = Nothing
set conn = Nothing
%>

</body>


Description:

Note: Copy the Source Code to Notepad or any other good Text Editor and save as .asp or .html or .css as the case may be. Give your own file name, if not described in the script.

::