简体   繁体   English

在ASP.net中使用Windows控件库

[英]USING windows control library in ASP.net

我通过在Office interop excel中添加引用来创建控件库,以在客户端中进行一些excel自动化。该控件在Windows窗体中可以正常工作。现在我需要在asp.net中添加控件,有人可以告诉我该怎么做。

a windows class library will work just fine in asp.net. Windows类库在asp.net中可以正常工作。 however, if you make a windows from control (or user control, etc) the control (etc.) will NOT work in asp.net. 但是,如果从控件(或用户控件等)创建窗口,则该控件(等)在asp.net中将无法工作。

all you have to do is add a reference to the assembly in your project. 您要做的就是在项目中添加对程序集的引用。 If your assembly references other assemblies, you will probably have to reference those in your project as well. 如果您的程序集引用了其他程序集,则您可能还必须引用项目中的那些程序集。 As long as you do not attempt to create instances of controls that have a informs UI, you should be OK. 只要您不尝试创建具有通知UI的控件实例,就可以了。

You cannot use Office Interop in an ASP.NET application, or any other server-based application. 您不能在ASP.NET应用程序或任何其他基于服务器的应用程序中使用Office Interop。 Please see Considerations for server-side Automation of Office , and please don't try it. 请参阅Office的服务器端自动化注意事项 ,请不要尝试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM