We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Linq Html Placeholders


I use linq placeholders in html template:

    <td>&lt;&lt;foreach [item in ProductTable]&gt;&gt;&lt;&lt;[item.Id]&gt;&gt;</td>
    <td>&lt;&lt;[item.Count * item.Price]&gt;&gt;</td>

Is it possible to replace ‘& lt;’ to something more readable?



Thanks for your inquiry. You are using LINQ Reporting syntax in HTML. In this case, you need to use the “& lt;” and “& gt;” as you are using. When you import this HTML into Aspose.Words DOM, it will be treated as proper LINQ Reporting syntax.


I want to share.
I found a workaround for this ticket: put “space” symbol after symbols “<<”. It’s works! Example:

        <td><< foreach [item in ProductTable]>><<[item.Id]>></td>
        <td><< if[item.Id > 50]>>AAAAA << else>>BBBBB << /if>><<[item.Name]>></td>
        <td><<[item.Count * item.Price]>></td>
        <td><<[BCS.dateFormat(item.Date, "yyyyMMddHHmm")]>><< /foreach>></td>

Maybe someone will come in handy.


Thanks for your inquiry. It is nice to hear form you that you have found the solution of your query. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.