By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,867 Members | 1,981 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,867 IT Pros & Developers. It's quick & easy.

CDO Mail and using asp code in htmlBody

P: 4
I have a form that inserts into a database and then generates an email to me with a link. I need that link to be a url parameter back to the record based on record ID. The url will be something like http://www.website.com/web_request_edit.asp?ID=101. Currently the line of code I have been struggling with is:
oMail.HTMLBody = "http://ocfs.state.nyenet/web_request_edit.asp?ID=&web_requests.fields.item( 'id').value&"

Can someone give me the correct syntax?
May 4 '12 #1
Share this Question
Share on Google+
6 Replies


jhardman
Expert 2.5K+
P: 3,405
Expand|Select|Wrap|Line Numbers
  1. oMail.HTMLBody = "http://ocfs.state.nyenet/web_request_edit.asp?ID=" & request("id")
Jared
May 4 '12 #2

P: 4
That didn't work. That only gave me:
http://ocfs.state.nyenet/web_request_edit.asp?ID.

I need http://ocfs.state.nyenet/web_request_edit.asp?ID=102. Any ideas?

Thanks
May 7 '12 #3

jhardman
Expert 2.5K+
P: 3,405
if that didn't work then you don't have a field "id" in your request object. Where does the id number come from?

Jared
May 7 '12 #4

P: 4
It's an autonumber field in my sql table <%=(web_requests.Fields.Item("ID").Value)%>
May 7 '12 #5

jhardman
Expert 2.5K+
P: 3,405
Expand|Select|Wrap|Line Numbers
  1. oMail.HTMLBody = "http://ocfs.state.nyenet/web_request_edit.asp?ID=" & web_requests.Fields.Item("ID").Value
does this work?

Jared
May 7 '12 #6

P: 4
Yes!...that did the trick at last I have my functionality!...thank you Jared.
May 8 '12 #7

Post your reply

Sign in to post your reply or Sign up for a free account.