Click here to Skip to main content
15,885,045 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello. I have my blog with a new article at: <a https://www.codeproject.com/Articles/1271364/Creating-a-Side-Menu-for-ASP-NET-Core-using-a-View . It's from a wordpress site. But, how exactly would I format the code propertly? It's got too much spacing in it.

Thanks

What I have tried:

editing the code with html editor and visual editor.
Posted
Updated 11-Dec-18 8:28am

You should post questions on articles that you have written to the Article Writing Discussion Boards[^].
 
Share this answer
 
Looks like the main problem was with your blocks of code. My recommendation would be to keep in a text editor and get rid of the extra line feeds, and then paste them in via the code widget... I did this sample wrapping the code with <pre lang=c#> and </pre>
C#
namespace CbaMvc.Areas.Admin.Controllers {

  public class MenuViewComponent : ViewComponent {

  private readonly CbaMenuHelper _cbaMenuHelper = new CbaMenuHelper();

  private readonly CbaAssessmentManager _assessmentManager;

  private readonly UserManager _userManager;

  public MenuViewComponent(CBAContext cbaContext, MRMContext mrmContext, UserManager<CbaUser> userManager) {
    _assessmentManager = new CbaAssessmentManager(mrmContext, cbaContext);
  }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900