I have a c# winforms application which is running fine... Now i want to convert it to an assembly and use it in an asp.net web application.....
WHich dll i have to refernce? http://img265.imageshack.us/img265/2272/dlls.jpg
I have a c# winforms application which is running fine... Now i want to convert it to an assembly and use it in an asp.net web application.....
WHich dll i have to refernce? http://img265.imageshack.us/img265/2272/dlls.jpg
You know ASP.NET allows you to use C# code right? Sounds like you just need to reconsider the GUI portion of the app for web usage and then you should be set.
This may or may not be easy. But if you wrote your code with an adequate separation of user interface and actual doing (or business) logic, then it should be easy enough.
It depends on which classes and methods you want to use. If they are in the exe, you can simply rename a.exe to a.dll. Then a.dll can be added as reference, and you can consume the public classes.
Noticeably that many things used in WinForms applications are not feasible or applicable to ASP.NET applications and can lead to serious performance issues. This is because WinForms and ASP.NET have different process models. Pay attention to that before it bites you.
You can reference .exe's as well as Dlls. I put a little bit of info on my blog here.
Rename the yourapp.EXE to yourapp.DLL and it as reference to any .Net application be it asp.net web or windows. Anything in compiled form in .Net contains MSIL which is a fair candidated for being referenced from any .net application. Just make sure the application also references dependant assemblies and libraries used by the EXE. Like, System.Windows.Forms, etc..