2013-09-07

Remove HTML tag

Regex.Replace(row["content"].ToString(), @"<(.|\n)*?>", string.Empty);

2013-09-06

Custom Template in VisualStudio

預設template位置
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ItemTemplates
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ProjectTemplates
預設Custom Template位置
\\MyDocument\Visual Studio 2012\Templates
工具->選項->專案和方案->一般  (可更改位置)


TO ADD A CUSTOM PROJECT ITEM TEMPLATE TO THE ADD NEW ITEM DIALOG BOX

  1. Create or open a project in Visual Studio.
  2. Add an item to the project and modify it if you want to.
  3. Modify the code file to indicate where parameter replacement should take place. For more information, see How to: Substitute Parameters in a Template.
  4. On the File menu, click Export Template.
  5. Click Item Template, select the project that contains the item, and click Next.
  6. Select the item for which you want to create a template, and click Next.
  7. Select the assembly references to include in the template, and click Next.
  8. Type the icon file name, preview image, template name, and template description, and click Finish.
    The files for the template are added to a .zip file and copied to the ..\Users\username\Documents\Visual Studio Version\Templates\ItemTemplates\ folder.