Solved

ASP results link to editing page

Posted on 2004-10-10
5
181 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 50

Accepted Solution

by:
Ryan Chong earned 125 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 50

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

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…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

808 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