How Can We Help?
Background
Decode Escaped HTML code eg <br/> which is displayed as <br/> in XMPro workspace rather than inserting a break line solution.
Steps
- As an example, consider the below query:
select cast(u.FirstName + ‘ ‘ + u.LastName + ‘ – ‘ + CONVERT(nvarchar, ptr.Hours) + ‘<br/>’ as varchar(255)) as [ResourceHours]
from tsh_Master_ProjectTask pt
inner join tsh_Master_Project p on p.Id = pt.ProjectId
left outer join tsh_Master_ProjectTaskResource ptr on ptr.TaskId = pt.TaskId
left outer join fcUser u on u.RoleID = ptr.ResourceId
where pt.ProjectId = @ProjectId and ptr.Active = 1) tmp
where mpt.TaskId = tmp.TaskId
FOR XML PATH (”)), 1, 2, ”) as Resource
HTML Query Result: Harsha Kandalam – 10 <br//>Nelius Jordan – 8 <br//>Chun Wong – 6 <br//>
- Map the query HTML result to a reference label.
- Use HttpUtility.HtmlDecode(REFERENCE VARIABLE).ToString() to decode and set the actual value back to the label.
Comments are closed.