P
Patrick.O.Ige
I have 2 asp files below:-
The first one displays OFFERS with the ServID and ServiceName (whcih is the
LINKS)-services.asp
The second one displays the data where servid = querystringID -offer.asp
Whats the best way to change these FILES to ASP.NET and how
Thanks
services.asp
--------------
Dim Conn
Dim rsCat
Dim strSQL
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Server.MapPath("..\db\business.mdb")
Set rsCat = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM services1"
Set rsCat = Conn.Execute(strSQL)
%>
<%
Do While Not rsCat.EOF
Response.Write "<img src='form_handler.gif'><a
href=""offers.asp?catID=" & rsCat("ServID") & """>" & rsCat("ServiceName") &
"</a><br><br>"
rsCat.Movenext
Loop
%>
<%
rsCat.Close
Conn.Close
%>
--------------------------------------------------------------------
OFFERS.asp
<%
Dim Conn
Dim rsProd
Dim strSQL
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Server.MapPath("..\db\business.mdb")
Set rsProd = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM offers " & "WHERE ServID = " &
Request.QueryString("catID") & " " & "ORDER BY Description"
Set rsProd = Conn.Execute(strSQL)
%>
<body>
<ul>
<%
Do While Not rsProd.EOF
Response.Write rsProd("Description")
rsProd.Movenext
Loop
%>
<%
rsProd.Close
Conn.Close
%>
The first one displays OFFERS with the ServID and ServiceName (whcih is the
LINKS)-services.asp
The second one displays the data where servid = querystringID -offer.asp
Whats the best way to change these FILES to ASP.NET and how
Thanks
services.asp
--------------
Dim Conn
Dim rsCat
Dim strSQL
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Server.MapPath("..\db\business.mdb")
Set rsCat = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM services1"
Set rsCat = Conn.Execute(strSQL)
%>
<%
Do While Not rsCat.EOF
Response.Write "<img src='form_handler.gif'><a
href=""offers.asp?catID=" & rsCat("ServID") & """>" & rsCat("ServiceName") &
"</a><br><br>"
rsCat.Movenext
Loop
%>
<%
rsCat.Close
Conn.Close
%>
--------------------------------------------------------------------
OFFERS.asp
<%
Dim Conn
Dim rsProd
Dim strSQL
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Server.MapPath("..\db\business.mdb")
Set rsProd = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM offers " & "WHERE ServID = " &
Request.QueryString("catID") & " " & "ORDER BY Description"
Set rsProd = Conn.Execute(strSQL)
%>
<body>
<ul>
<%
Do While Not rsProd.EOF
Response.Write rsProd("Description")
rsProd.Movenext
Loop
%>
<%
rsProd.Close
Conn.Close
%>