Skip to main content

Posts

Showing posts from October, 2006

dotNET Project Template and Addin Creation

Project and Item Templates Create Reusable Project and Item Templates for the development team . Project Template Creation Creation of a project or item template is pretty straight forward. Use the File->Export Template to create the template, the wizard will ask you which Project you wish to base your Template on, this will result in the contents of that Project being added to the Template. Note that depending on the type of Project you select will determine where the Template appears in the File->New Project dialog. i.e. If you base your Template on a Website Project in VB then the Template will appear in the File-New Website and under the VB section in the File->New Project dialog. Create a project like the one found at http://msdn.microsoft.com/msdnmag/issues/06/01/CodeTemplates/default.aspx . The Template is just a zip file with an extra xml file within, the xml file describes what to add to the project when a user uses File->New Project. If you wish to generate Projec...

dotNET Custom Controls and Resource Scripts

Custom Controls are Web Controls, (TextFields, Labels etc) which are customized by you. The Custom Controls can then added to your website by adding the assembly containing the Custom Control or used through Visual Studio ASPX editor by created adding the Custom Control to the ToolBox (this is done by Right-Clicking the ToolBox and selecting Choose Items... then select the locate of the Assembly containing the Custom Control. An example of a very simple Custom Control implementation can be found here Simple Custom Control (msdn) Additionally you can embed some of you JScript code in a .js file instead of in the aspx page itself. This js file should be added to you Custom Control project as an Embedded Resource (This means the JScript code is embedded in the resultant assembly. When this assembly is referenced by a website project it will be able to access the JScript functionality (??). To add the js file add it to the Custom Control Project as a Resource. Add a new Resource file to t...

dotNET Custom Configuration Handlers

So you want to add some configurable content to your application/Web application. The place for your data is in the configuration file, app.config or web.config. You could put it in the AppSettings, a small problem with this is it uses Key/Value collections which means that the Keys must be unique, that's not the end of the world but you may want to access a complete section in the config file and sort them or something. The alternative is to create your own section in the config file. To access this you'll need to create your own Handler Class. I'll explain the settings in the config file followed by the Handler Class and then how to access it. Custom Configuration Handlers on ASP.NET Forum