简体   繁体   中英

How to auto-generate html template in a .cshtml file in Visual Studio 2022?

While doing an ASP.NET project, I created a blank Details.cshtml file in Visual Studio 2022. After that, I wanted to auto-generate an html template in the file, like below -

<html xmlns=""http://www.w3.org/1999/xhtml>
  <head>
    <title></title>
  </head>
  <body>

  </body>
</html>

I thought that typing html and then pressing Tab would do the trick (as per the 3:30 timestamp in this video ), however it didn't work. When I searched on the inte.net, all I got was VS Code related results, not even one result talked about Visual Studio .

Can anybody please help me with this?

I believe you can do that just with typing single ":" and pressing TAB :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM