locked
Reusing code (functions, subroutines, etc.) in Multiple Pages RRS feed

  • Question

  • User529784304 posted

    I am very familiar with modules from my time with VB and my other programming, but what is the most commonly used practice and the best way to go about this for a website application with ASP.NET?  Say I have multiple pages (in multiple directories; some in the root directory, some in child directories from the root) that will call the same set of functions and subroutines, how do I go about putting this reusable code in a place where the pages and their respective classes can call the functions/subroutines?

    Thanks in advance. :)

    Monday, December 27, 2010 9:00 PM

Answers

  • User-49141863 posted

    The code files when placed in App_Code folder can be accessed from anywhere in the website. So you just have to create new files and place them in the App_Code folder.

    http://www.HRStop.com/?src=asp

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, December 27, 2010 11:57 PM

All replies

  • User-49141863 posted

    The code files when placed in App_Code folder can be accessed from anywhere in the website. So you just have to create new files and place them in the App_Code folder.

    http://www.HRStop.com/?src=asp

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, December 27, 2010 11:57 PM
  • User529784304 posted

    ah ok i see.  what file extensions/file types do i make these files.

    Tuesday, December 28, 2010 7:41 AM
  • User397347636 posted

    .vb 

    Tuesday, December 28, 2010 10:34 AM