[SOLVED] Â FK values in email message |
2/1/2017 7:25:37 PM |
ASPRunner.NET General questions | |
![]() I am trying to email data after the record is updated. I am using a FK value so right now the raw value is "1". I would like to send the displayed value "Approved" from the lookup table. |
|
M
|
Mack88DevClub member 2/1/2017 |
Hi Jerry, |
![]() |
jadach authorDevClub member 2/1/2017 |
Yes, but it didn't like that. Perhaps my syntax was wrong. I check in visual studio and it red lined view control as not recognizing it. |
M
|
Mack88DevClub member 2/1/2017 |
Yes, but it didn't like that. Perhaps my syntax was wrong. I check in visual studio and it red lined view control as not recognizing it.
|
![]() |
jadach authorDevClub member 2/2/2017 |
Perhaps. Maybe I will leave this out for another day. if no help arrives, I will put a support ticket in. |
![]() |
jadach authorDevClub member 2/2/2017 |
I am confident there is a better way, but this worked for me. using (System.Data.SqlClient.SqlConnection sql_I = new System.Data.SqlClient.SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["YourConnectionStringNameFromWebConfig"].ConnectionString)) |
![]() |
Admin 2/3/2017 |
Just wanted to say that there is an error in the manual and we'll fix it shortly. ViewControl.Format(data, "<FieldName>", "<TableName>"); |
![]() |
jadach authorDevClub member 2/5/2017 |
Thanks, but I still can't figure out the syntax to make this work. |
![]() |
Admin 2/6/2017 |
Yes, you can try ViewControl.Format(values, "Status", "LUStatus") or ViewControl.Format(values, "Status", "LUStatus").ToString() |
![]() |
jadach authorDevClub member 2/7/2017 |
Yes, you can try ViewControl.Format(values, "Status", "LUStatus") or ViewControl.Format(values, "Status", "LUStatus").ToString()
|
![]() |
jadach authorDevClub member 2/7/2017 |
Thanks Sergey. However when I do this, I still get the int value (StatusID), not the text. string msg = "Status:<br /> "+ViewControl.Format(values, "Status", "LUStatus").ToString()+""; My LUStatus table is as so: StatusID Status 1 Shipped 2 Hold 3 Pending
|