How can I update the description column of a workflow task in SharePoint 2013 using c# that will contain a html link that has to open in a new window.

Any suggestions?

1 Answer 1


Found the solution...

    // Set a couple of format constants
    // Approval Page url format
    public const string ApprovalPageUrlFormat = @"http://{0}/it/SitePages/ChangeRequestWFApproval.aspx?rid={1}";
    public const string TaskDescriptionLinkHtmlFormat = @"Please click <a href='{0}' target='_blank'>here</a> to approve the request";

    private void myCreateTaskWithContentType_MethodInvoking(object sender, EventArgs e)

            // Set Other Task Properties

            // Create the url 
            string url = string.Format(ApprovalPageUrlFormat,
                    Environment.MachineName.ToLower(), currentItem.UniqueId.ToString());

            // Assign the url
            myWorkflowTaskProperties.Description = string.Format(TaskDescriptionLinkHtmlFormat, url);


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.