Search HouseOfScripts.com

 

All Scripts        JavaScripts        ASP Scripts        Other Scripts

 

  How to Link Recordset Objects to Hyper Links with ASP? asp, send, email, cdonts, link, recordset, hyper, hyperlink, create, list, box, dependant, dynamic

I had a few questions about creating Hyperlinks using ASP objects so I decided to create a page where I explain it. There are a few steps involved:
Recordset Objects Hyper Links ASP Recordset Objects Hyper Links ASPRecordset Objects Hyper Links ASPRecordset Objects Hyper Links ASP

1. Create a regular hyperlink:

href="page1.asp"

 

2. Now we have to add ASP code:

href="page1.asp?<%= "Name1=" & Recordset1.Fields.Item("Field1").Value%>"

Where:
page1.asp
is the page to be forwarded to.
Name1 is the Variable Name
Recordset1 is the Name of your Recordset
Field1 is the name of the field in the Recordset1

 

3. Need to transfer more then one Varialbe? Add '+' and another Variable. You can do it as many times as you want:

href="page1.asp?<%= "Name1=" & Recordset1.Fields.Item("Field1").Value + "Name2=" & Recordset1.Fields.Item("Field2").Value + "Name3=" & Recordset1.Fields.Item("Field3").Value + "Name4=" & Recordset1.Fields.Item("Field4").Value %>"
 

4. Also it is possible to do it with different Recordsets:

href="page1.asp?<%= "Name1=" & Recordset1.Fields.Item("Field1").Value + "Name2=" & Recordset1.Fields.Item("Field2").Value + "Name3=" & Recordset2.Fields.Item("Field1").Value + "Name4=" & Recordset2.Fields.Item("Field2").Value %>"

 

 


Home       Scripts       Active WebTools       Web Templates       Forum       Tools        Hosting       Questions/Comments       Add/Request