Convert a web application to dll

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cmrhema
    Contributor
    • Jan 2007
    • 375

    #1

    Convert a web application to dll

    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
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    What have you tried? Which version ot asp.net? Are you using VS?

    Comment

    • cmrhema
      Contributor
      • Jan 2007
      • 375

      #3
      Originally posted by kenobewan
      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



      Code:
      namespace DllTest
      {
          public class Class1
          {
              public Class1()
              {
              }
              public string check(string a)
              {
                  string j = a + "Test ok";
                  return j;
              }
          }
          
      }
      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

      Code:
      using DllTest;
      and wrote the below code in button click event

      Code:
      private void button1_Click(object sender, EventArgs e)
              {
                  DllTest.Class1 a1 = new Class1();
                  string jj= a1.check("checkout");
                  MessageBox.Show(jj);
              }


      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

      Comment

      • Shashi Sadasivan
        Recognized Expert Top Contributor
        • Aug 2007
        • 1435

        #4
        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

        Comment

        • cmrhema
          Contributor
          • Jan 2007
          • 375

          #5
          Originally posted by Shashi Sadasivan
          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

          Comment

          Working...