ReSharper 8.0 Web Help

Code generation

ReSharper allows you to generate content for ASP.NET web forms and master pages according to content placeholders defined in the related master page files.


This operation is only available if the master page (or the base master page) related to the file defines some placeholders that do not have corresponding content units in the file.
To generate content for placeholders
  1. In the editor, open an .aspx or .master file and position the caret where you want to generate a Content control.
  2. On the main menu, choose ReSharper | Edit | Generate Code, or press Alt+Insert.
  3. From the Generate pop-up menu, click Content for Placeholders.
  4. On the Generate content for masterpage's content placeholder page of the Generate wizard, select ContentPlaceHolder controls from a master page to generate related Content controls in the current file.
  5. As an option, use Copy default content, if ContentPlaceHolder control contains default content and you want to copy it to the content page.
  6. You can click Advanced and then Next to view exactly what controls will be created.
  7. Click Finish to complete the wizard.


ReSharper enables ASP.NET and ASP.NET MVC developers to generate web forms, tags, and attributes with the following features:

  • Live templates for ASP.NET controls, script blocks, tags, and attributes:


  • Surround templates for tags, links, and foreach blocks:


  • File templates for web forms, web controls, and master pages:


  • Generating Content tags based on ContentPlaceHolder tags defined in a master page.