Solved

ASP results link to editing page

Posted on 2004-10-10
5
178 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
5 Comments
 
LVL 49

Accepted Solution

by:
Ryan Chong earned 125 total points
Comment Utility
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
Comment Utility
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 49

Expert Comment

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

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now