在web表单asp.net地区表单、地区、web、net

2023-09-06 08:35:31 作者:我是土豆又土又逗

我是新来asp.net,我想在我的.cs页文件中定义的#region。是否有可能在网页。我知道它可以在WinForms的工作要做。

I am new to asp.net, I want to define #Region in my .cs page file. Is it possible to that in web pages. I know it can be done in winforms.

推荐答案

您可以定义#地区标签在你的code隐藏文件以同样的方式,你可以任何的.cs 文件 - 它没有什么区别,如果他们在Web项目或其他项目

You can define #region tags in your code behind files the same way you can in any .cs file - it makes no difference if they are in a web project or any other project.

您不能在定义它们的.aspx 页。

在你的的.cs code隐藏文件:

In your .cs code behind file:

#region "Name of region"

   // Code comes here

#endregion
 
精彩推荐
图片推荐