I created a control library by adding refrence to office interop excel to do some excel automation in client.The control works fine in windows forms Now i need to add the control in asp.net can somebody tell how to do that.
-
2Have you tried adding a reference to the library?Neil Knight– Neil Knight2011-09-20 19:03:27 +00:00Commented Sep 20, 2011 at 19:03
-
possible duplicate of Steps for embedding a windows forms user control in web pageHenk Holterman– Henk Holterman2011-09-20 19:16:18 +00:00Commented Sep 20, 2011 at 19:16
2 Answers
a windows class library will work just fine in asp.net. however, if you make a windows from control (or user control, etc) the control (etc.) will NOT work in 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.
1 Comment
You cannot use Office Interop in an ASP.NET application, or any other server-based application. Please see Considerations for server-side Automation of Office, and please don't try it.