gpt4 book ai didi

html - ASP.NET MVC View HTML 折叠展开

转载 作者:可可西里 更新时间:2023-11-01 12:52:43 25 4
gpt4 key购买 nike

在处理 ASPX 或 HTML 文件时,我经常使用 Visual Studio 的折叠或展开功能。然而,在 ASP.NET MVC View 中,没有这样的功能,随着 View 变得越来越复杂,事情真的变得困惑和难以管理。

有谁知道如何在 ASP.NET MVC View 中启用 HTML 折叠/展开?

enter image description here

最佳答案

在 Visual Studio 中,您可以像这样手动添加轮廓区域:

To create or remove a collapsible region

  1. Select the text you want to treat as a collapsible region.

  2. To create a collapsible region, on the Edit menu, point to Outlining, and then click Hide Selection.

The editor turns the selection into a region, collapses it, and displays a box with an ellipsis (...) to indicate that the area contains a collapsed area. You can hold the mouse pointer over the box to see its contents.

  1. To remove a collapsible region, collapse it, and then click it to select it.

  2. On the Edit menu, point to Outlining, and then click Stop Hiding Current.

To collapse and expand a single region

  1. To collapse a region, click the minus sign (-) in the margin of the editor.

  2. To expand a collapsed region, click the plus sign (+) in the margin.

To collapse and expand all regions

On the Edit menu, point to Outlining, and then click Toggle All Outlining.

From MSDN

但这并不实际。

对于 HTML,您可以在文本编辑器选项中手动编辑每个标签的大纲选项:

enter image description here

enter image description here

最小行数最小值为1才有效。

More info on MSDN

关于html - ASP.NET MVC View HTML 折叠展开,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8051687/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com