简体   繁体   English

如何在 Visual Studio 2022 的 a.cshtml 文件中自动生成 html 模板?

[英]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 -在做一个 ASP.NET 项目时,我在 Visual Studio 2022 中创建了一个空白的Details.cshtml文件。之后,我想在该文件中自动生成一个 html 模板,如下所示 -

<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.我认为输入html然后按 Tab 键就可以解决问题(根据该视频中的 3:30 时间戳),但它不起作用。 When I searched on the inte.net, all I got was VS Code related results, not even one result talked about Visual Studio .当我在 inte.net 上搜索时,我得到的所有结果都是与 VS Code相关的结果,甚至没有一个结果谈到Visual Studio

Can anybody please help me with this?有人可以帮我吗?

I believe you can do that just with typing single ":" and pressing TAB :)我相信您只需键入一个“:”并按 TAB 键就可以做到这一点 :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 Visual Studio 2010 中自动生成 try catch 块 - Auto-generate a try catch block in visual studio 2010 自动生成模板字段或网格视图? - Auto-generate template fields OR gridviews? 使用Visual Studio 2010创建XML模式并使用它自动生成可序列化类 - Creating XML schema and auto-generate the serializable class out of it using Visual Studio 2010 您可以自动生成用于在C#中分配对象属性的代码吗? (视觉工作室) - Can you auto-generate code for assigning properties of an object in C#? (Visual Studio) 在Visual Studio中设计SQL架构并自动生成SQL脚本以创建和升级数据库 - Design SQL schema in Visual Studio and auto-generate SQL script to create and upgrade database Visual Studio 2022 如何仅在选项卡上自动完成? - Visual studio 2022 how to auto complete only on tab? 如何在 Visual Studio 2022 中生成序列和 UML 类图? - How to generate sequence and UML class diagram in Visual Studio 2022? 如何在 Visual Studio for Mac 2022 上生成身份页面? - How can I generate identity pages on Visual Studio for Mac 2022? "如何基于 XSD\/XML 文件以特定 .NET 语言自动生成代码" - How to auto-generate code in specific .NET language based on an XSD/XML file Visual Studio 2022 关闭自动缩进 - Visual Studio 2022 turn off auto indenting
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM