在web表单asp.net地区 [英] Regions in webforms asp.net

查看:114
本文介绍了在web表单asp.net地区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来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

这篇关于在web表单asp.net地区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆