Free Support Forum - aspose.com

How to insert a HTML to custom field?


#1

Is there any way to insert a HTML string to Aspose.Tasks custom field? here is my sample code.

var projectAttribute = project.ExtendedAttributes.FirstOrDefault(i => i.Alias == "MyJourney");

                        if (projectAttribute == null)
                        {
                            ExtendedAttributeTask taskAttribute = (ExtendedAttributeTask)Enum.Parse(typeof(ExtendedAttributeTask), "Text1");

                            projectAttribute = ExtendedAttributeDefinition.CreateTaskDefinition(CustomFieldType.Text, taskAttribute, "MyJourney");
                            project.ExtendedAttributes.Add(projectAttribute);

                           
                        }

                        var taskAttrubute = projectAttribute.CreateExtendedAttribute();

                        if (projectAttribute.CfType == CustomFieldType.Text)
                        {
                            taskAttrubute.TextValue = value; //here value is the HTML string
                        }

#2

@srinudhulipalla

We have logged this issue with ID “TASKSNET-3033” for further investigation. You will automatically be informed here once we have more information to share.