locked
How to make changes in HTML markup appear in the browser during debugging? RRS feed

  • Question

  • User1134142769 posted

    I created a page.
    I started debugging.
    Debugging works. The page is displayed in the browser.
    I make changes to the HTML code of the page in Visual Stduio.
    I click save in Visual Stduio.
    I click "Update" in the Browser.
    After the update, I want to see in the Browser the changes to the HTML pages that I made Visual Stduio.
     
    Question
    How to make changes in HTML markup appear in the browser during debugging?

    Friday, April 3, 2020 8:38 PM

Answers

  • User288213138 posted

    Hi frmasp897654,

    Result: changes in the browser do not appear.

    Usually, the content will not change when you compile the project.

    If you want to change the html content when compiling, you can try to use Razor file.

    Razor files with a .cshtml extension are compiled at both build and publish time using the Razor SDK. Runtime compilation may be optionally enabled by configuring your application.

    More information about how to use the Razor file you can refer to this link:

    https://docs.microsoft.com/en-us/aspnet/core/mvc/views/view-compilation?view=aspnetcore-3.1

    Best regards,

    Sam

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, April 7, 2020 2:36 AM

All replies

  • User475983607 posted

    How to make changes in HTML markup appear in the browser during debugging?

    If you only made changes to the HTML no HTML helpers or server controls then simply refresh the browser, F5 or ctrl-F5.

    Friday, April 3, 2020 8:52 PM
  • User1134142769 posted

    I am making changes to the "Index.cshtml" file.
    I press Ctrl + S.

    I'm moving to Browezre.
    I press F5.

    I press Ctrl-F5.

    Result: changes in the browser do not appear.

    Question.
    What could be the problem?


    Saturday, April 4, 2020 9:43 AM
  • User288213138 posted

    Hi frmasp897654,

    Result: changes in the browser do not appear.

    Usually, the content will not change when you compile the project.

    If you want to change the html content when compiling, you can try to use Razor file.

    Razor files with a .cshtml extension are compiled at both build and publish time using the Razor SDK. Runtime compilation may be optionally enabled by configuring your application.

    More information about how to use the Razor file you can refer to this link:

    https://docs.microsoft.com/en-us/aspnet/core/mvc/views/view-compilation?view=aspnetcore-3.1

    Best regards,

    Sam

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, April 7, 2020 2:36 AM