This topic is locked
[SOLVED]

 Including specific field values in email

5/25/2018 1:17:13 PM
ASPRunner.NET General questions
S
swiersman author

HI,
I know this must be simple, but how do you include specific field values in the body of an email?
I see templates for sending a simple email, and for sending all fields that have been updated, but none for specific fields I would like to have sent.
Thanks ahead of time for any assistance...

admin 5/25/2018

If you talking about events like BeforeEdit or AfterEdit you can access the value of any field as value["FieldName"]. So just compose your message inserting field values where needed.
More info:

https://xlinesoft.com/asprunnernet/docs/after_record_updated.htm

https://xlinesoft.com/asprunnernet/docs/runner_mail_function.htm

jadachDevClub member 5/27/2018



HI,
I know this must be simple, but how do you include specific field values in the body of an email?
I see templates for sending a simple email, and for sending all fields that have been updated, but none for specific fields I would like to have sent.
Thanks ahead of time for any assistance...


I think what you are looking for is the syntax to add field data into the body of the email. See here where FirstName and LastName are fields in your database:

string msg = "Greetings "+values["FirstName"].ToString()+" "+values["LastName"].ToString()+"";