如何在asp.net中使用类? [英] How to use class with asp.net??

查看:71
本文介绍了如何在asp.net中使用类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

plz给我演示了如何将类与asp.net一起使用.

plz give me the demonstration to use class with asp.net.

推荐答案

您应该购买一本非常基础的C#书籍,然后再购买一本非常基础的ASP.NET书籍. .我不知道该说什么,并假设您会理解.

您可以在页面内定义类,但是使它们进入应用程序代码区域更有意义.您可以像在其他任何类中一样在页面内创建它们,但是您不要忘记为一个渲染每个页面都创建一次,因此您创建的任何类在回发之间都不会有状态.
You should buy a really basic C# book, then a really basic ASP.NET book. I don''t know what to say to that question, and assume that you''ll understand it.

You can define classes inside your page, but it makes more sense for them to go in the app code area. You create them inside your page like any other class, but you should not forget that each page is created once, for one rendering, so any classes you create will have no state between postbacks.


这篇关于如何在asp.net中使用类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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