Click here to Skip to main content
15,892,746 members
Articles / Programming Languages / XSLT

Template Messages Using XSL Transformations and XML Serialization

Rate me:
Please Sign up or sign in to vote.
4.33/5 (5 votes)
23 Aug 2007CPOL7 min read 32.3K   429   29  
This article shows how you can implement templated messages, such as email templates
using System;
using System.Threading;
using System.Windows.Forms;

namespace TemplatesExample
{
    internal class Program
    {
        [STAThread]
        private static void Main()
        {
            Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);
            Application.Run(new MainForm());
        }

        private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
        {
            string error = e.Exception.ToString();
            MessageBox.Show(error, "Error", 
                            MessageBoxButtons.OK, 
                            MessageBoxIcon.Error);
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Bulgaria Bulgaria
Cvetomir Todorov is a student in the Sofia University. His interests include Object Oriented Programming and Design, Design Patterns, Producing High-Quality Code, Refactoring, Unit Testing, Test Driven Development etc. The technology he's using is .NET with C# language.

Comments and Discussions