By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,617 Members | 1,166 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,617 IT Pros & Developers. It's quick & easy.

Convert a web application to dll

100+
P: 375
Hi,

I have successfully converted a class library to dll.
Now I want to convert a web application to dll. Thats an aspx.cs pages to a dll.

Is it possible
Any links will be very helpful

regards
cmrHema
May 18 '08 #1
Share this Question
Share on Google+
4 Replies


kenobewan
Expert 2.5K+
P: 4,871
What have you tried? Which version ot asp.net? Are you using VS?
May 18 '08 #2

100+
P: 375
What have you tried? Which version ot asp.net? Are you using VS?

I am working on visual studo 2005 professional edition.
I am working on asp.net 3.0

Actually, i tried a very simple thing.

I created a class library. Inside the library i wrote a simple method as below



Expand|Select|Wrap|Line Numbers
  1. namespace DllTest
  2. {
  3.     public class Class1
  4.     {
  5.         public Class1()
  6.         {
  7.         }
  8.         public string check(string a)
  9.         {
  10.             string j = a + "Test ok";
  11.             return j;
  12.         }
  13.     }
  14.  
  15. }
I build the program, So a dll will be created in the debug folder of the above application.


Now I create a simple new application in C# and asp.net and include the above dll using Add Reference

i included the namespace

Expand|Select|Wrap|Line Numbers
  1. using DllTest;
and wrote the below code in button click event

Expand|Select|Wrap|Line Numbers
  1. private void button1_Click(object sender, EventArgs e)
  2.         {
  3.             DllTest.Class1 a1 = new Class1();
  4.             string jj= a1.check("checkout");
  5.             MessageBox.Show(jj);
  6.         }


Now when i execute the above program , it will show at the button click
"checkoutTestOk"



Now as stated above, I have created a ClassLibrary.
My question was, is there anything ,just similar to the ClassLibrary, in web applications

In case i want a webapplication to be called in various other webpages, Can i do something similar to the above

regards
cmrhema
May 19 '08 #3

Shashi Sadasivan
Expert 100+
P: 1,435
Unlike any other application, webpages consist of classses.
However they also have aspx pages which are not compilable.

What you could do is, deploy your web application as a precompiled application
Have a look at this article on how to do so.

This then creates dll's of all pure code files, but puts that in a dll which is named pretty horrifically.

You can add this dll to other projects, and work with it.

But a better way would be to identify which classes would be accessed, and create libraries of them, and access it using both applications
May 19 '08 #4

100+
P: 375
Unlike any other application, webpages consist of classses.
However they also have aspx pages which are not compilable.

What you could do is, deploy your web application as a precompiled application
Have a look at this article on how to do so.

This then creates dll's of all pure code files, but puts that in a dll which is named pretty horrifically.

You can add this dll to other projects, and work with it.

But a better way would be to identify which classes would be accessed, and create libraries of them, and access it using both applications
Thanks for the article.
I will try out and revert back soon

regards
cmrhema
May 20 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.