When you add a new page to your Web site, do you often find yourself cutting and pasting from another page to get started? If you're spending more time importing controls and setting up content regions for your master page than actually working on the new page, you might want to look into creating a "RadControls T4 Item Template" in Visual Studio with “RadControls for ASP.NET AJAX VS Extensions”
Below is a basic way to get started with a “RadControls for ASP.NET AJAX” T4 Item Templates.
To create your own RadControls T4 Item Template:
2. Create a file TemplateInfo.xml. This is basically the file that contains XML that the wizard can read to understand how it should display your template. See code sample below.
3. Add the MyTemplate.t4 and TemplateInfo.xml to the appropriate ItemTemplate folder found in your RadControls for ASP.NET AJAX installation folder, for example: C:\Program Files\Telerik\RadControls for ASPNET AJAX Q1 2009\VSExtensions\Templates\ItemTemplates\General\MyTemplateFolder
4. If you have the Visual Studio open when you pasted the files you will need to exit Visual Studio. Restart Visual Studio, open your project and select the “Project” menu and choose the “Telerik->Add RadControls Template…” menu item
5. Select “My T4 Template WebForm” and click Next. The Basic Wizard Information dialog box appears.
6. Click Next And Select date from the DateTime picker
7. Click Finish. After a few moments, the Telerik Wizard will create a new Project Item.
Initially, you'll have a basic Item with minimal functionality. You can try it out by run the application
Associated Solution: Create Your Own T4 Item Template - Part 1
[RadControls Installation Folder]\VSExtensions\Templates\ItemTemplates\General\MyTemplateFolder\ )
In the next post we will look into the properties determining the structure of the TemplateInfo.xml file.
Plamen Peshev | The Telerik VSXTeam
Copyright © 2016, Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.