从App_code调用asp类 [英] Call asp class from App_code

查看:105
本文介绍了从App_code调用asp类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi


我将winform projecto迁移到Web应用程序项目

这个winform项目有一些类调用winform类的某些方法



在Web应用程序项目中,我必须将我的类放入app_code文件夹,但现在他们无法实例化winform类。



是否可以调用app_code之外的类?

我该怎么办?



谢谢

Hi
Im migrating a winform projecto to a web application project
This winform project has some classes that call some methods of the winform class

In the Web application project, I have to put my classes into app_code folder, but now they cannot instantiate the winform class.

Is possible to call a class that is outside of app_code ?
What could I do?

Thanks

推荐答案

必须将我的类放入app_code文件夹,但现在他们无法实例化winform类。



不,你不能 - 你不能在Web应用程序中使用Winforms表单或控件:如果可以,它们将显示在服务器而不是客户端,这似乎在开发中工作,但是它在生产时完全失败。



您可以迁移业务逻辑及其类,可能还有数据逻辑(对连接字符串进行一些更改(如此),但是表示层是一个完整的重写:两个系统根本不能以相同的方式工作。
"have to put my classes into app_code folder, but now they cannot instantiate the winform class."

No, you can't - you cannot use Winforms forms or controls in a web application: if you could, they would display on the Server not the client, which would seem to work in development, but would fail completely when it got to production.

You can migrate the Business logic and it's classes over, and probably the Data logic (with a few changes to connection strings as so forth) but the Presentation layer is a complete re-write: the two systems do not work in the same way at all.


这篇关于从App_code调用asp类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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