[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

ASP results link to editing page

Posted on 2004-10-10
5
Medium Priority
?
188 Views
Last Modified: 2010-03-17
ok have page that does ASP query to datasource and brings back results but having problem putting link into results which takes viewer to an edit page


<!-- Code -->
 <%
strSearch = Request.Form("search")

If strSearch <> "" Then
      Dim strConnect, SQL
      Dim RS
      strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("ITtracking.mdb") & ";"

      SQL = "SELECT * FROM ITTable WHERE INSTR(ITTable.ITNumber,'" & strSearch & "')"

      Set RS = Server.CreateObject("Adodb.Recordset") 'Used for pulling main categories from DB
      RS.Open SQL,strConnect
         ' here's where our custom error goes:
     If Rs.BOF then
        ' no records found so redirect to custom error page.
         response.redirect "sorry.htm"
        End If
      Do Until RS.EOF
            
########################################################
Need the results to this line (ITNumber) to be a link to an edit page I have another page that produces list of all results in database then links to edit page works fine need "ITNumber to be link to same page with item numer ID which was brought back from database
########################################################
                  Response.Write RS("ITNumber") & "<BR><BR>"
                  Response.Write RS("DateArrived") & "<BR><BR>"
                  Response.Write RS("RefNumber") & "<BR><BR>"
                  Response.Write RS("Quantity") & "<BR><BR>"
                  Response.Write RS("PUDate") & "<BR><BR>"
                  Response.Write RS("PUNumber") & "<BR><BR>"
                  Response.Write RS("ID") & "<BR><BR>"
                  Response.Write RS("OriginalIT") & "<BR><BR>"
                  Response.Write RS("ValidatedIT") & "<BR><BR>"
                  Response.Write RS("CustomsRelease") & "<BR><BR>"
                  Response.Write RS("ShippingTally") & "<BR><BR>"
                  Response.Write RS("NVOCCRelease") & "<BR><BR>"
                  Response.Write RS("PaperlessIT") & "<BR><BR>"
            'End If

            RS.MoveNext
      LOOP
      
      RS.Close
      
End If

%>
0
Comment
Question by:Wiredwizard
  • 2
3 Comments
 
LVL 54

Accepted Solution

by:
Ryan Chong earned 500 total points
ID: 12310728
In your page above, you need to create hyperlinks in order to enable you to click it and go to the edit page. something like:

...
<a href="editdetail.asp?id=<%=Rs("ID")%>">Edit</a>
...

or what's your exact problem?
0
 

Author Comment

by:Wiredwizard
ID: 12335128
tried that got this error


Microsoft VBScript compilation error '800a0400'

Expected statement

/securefiles/edit.asp, line 77

<a href="editdetail.asp?id=<%=Rs("ID")
^
0
 
LVL 54

Expert Comment

by:Ryan Chong
ID: 12335788
Let me know what's the full script for line 77? Are you missing to put a "%>" there??
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Convert websphere application server default chained Certificates from 1024 to 2048 keysize or higher size and also you can change signatureAlgorithm . Please make sure Websphere Application Server fixpack 7.0.0.23 or Above. The following steps a…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Loops Section Overview
Suggested Courses

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question