This topic is locked

email hyperlink list page

9/22/2008 1:55:34 PM
ASPRunnerPro General questions
R
Robvanlier author

Hi,
I am trying to figure out how to click a hyperlink or buutton in the list page. I want to list a number of jobs where they can directly respond for the job (without going to a viewpage).

In the view page I get it to work, but not in the listpage. I have tried following:
[codebox]str = "select * from Jobs where ID = " & Request("editid1")

Set rsTemp = server.CreateObject("ADODB.Recordset")

rsTemp.open str, dbConnection

Response.write "<a href=""mailto:" & rsTemp("Email") & "?subject=Yoursubject&body=yourbody "">Click to send record info!</a>"[/codebox]
But because it is a list page the Request("editid1") won't work.
How to get around this one? Please advise me.
Best regards,

Rob

Sergey Kornilov admin 9/22/2008

There are several ways to implement this.
You can set "View as" type of ID field to "Custom" and use the following code:

str = "select * from Jobs where ID = " & strValue

set rsTemp = server.CreateObject("ADODB.Recordset")

rsTemp.open str, dbConnection

strValue = "<a href=""mailto:" & rsTemp("Email") & "?subject=Yoursubject&body=yourbody "">Click to send record info!</a>"

rstmp.Close : set rstmp = nothing
R
Robvanlier author 9/23/2008

Thanks, works great!