Creating your own Classes in C# in ASP.net #.Net Web Applications

Brought from our old site: http://salearningschool.com/displayArticle.php?table=Articles&articleID=1348&title=Creating%20your%20own%20Class%20in%20C#%20in%20ASP.net

Creating your own Class in C# in ASP.net

  • It is kind of simple. You need to create a class library. The class library will create a dll file. From your project, you need to add reference to the dll file. Then you will be able to use the classes and methods of the class library.
  • Check the following code. One is a sample class library and another one is how to use the class. The class library implements two methods such as add and subtract (to add or subtract two numbers). The project uses the namespace [class library] and calls these methods
  • You can get the dll file in the bin/debug or bin/release folder under your class library project
  • You can right click on your project/website [in solution explorer], and click Add Reference, then click browse and select the dll file created
  • Check the class library below
  • Check the Form in picture. This form uses the class library.
  • Check the Form Code to use the Library
  • Check the Backend Form Code to use the Library

From: http://sitestree.com/?p=3733
Categories:.Net Web Applications
Tags:
Post Data:2016-07-16 11:56:21

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>

Leave a Reply