Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Tips & Tricks: CodeSmith Template Encoding.

There may be a time when you need to use Extended Ascii Codes in your CodeSmith templates. If you have already tried using them into your Template you have more than likely ran into the following problem. When a user first creates a template an Encoding Attribute is not added by default to the CodeTemplate directive. So when a user starts adding characters in the Extended ASCII range, they will run into the following problem without first setting the encoding attribute. Below is an example of using Extended ASCII characters in a template.

If you don't add the Encoding Attribute to your template before saving, closing and reopening your template. You will be greeted by something like this.

The solution to this problem is to add an Encoding attribute to the CodeTemplate directive before saving.

Encoding="UTF-8" %>



This post first appeared on Blogs - Windowscoding.com;, please read the originial post: here

Share the post

Tips & Tricks: CodeSmith Template Encoding.

×

Subscribe to Blogs - Windowscoding.com;

Get updates delivered right to your inbox!

Thank you for your subscription

×