ReSharper 2024.3 Help

Code Generation in ASP.NET

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.

Generate content for placeholders

  1. In the editor, open an .aspx or .master file and place the caret where you want to generate a Content control.

  2. Press Alt+Insert or choose ReSharper | Edit | Generate Codeā€¦ from the main menu. Alternatively, you can press Control+Shift+A, start typing the command name in the popup, and then choose it there.

  3. In the Generate menu, choose 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.

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

ReSharper: Generate content for masterpage's content placeholder
Last modified: 11 February 2024