Include files .cs in a page .aspx

Last post 06-05-2007 2:47 PM by JeffreyABecker. 2 replies.

Sort Posts:

  • Include files .cs in a page .aspx

    06-05-2007, 12:36 PM
    • Loading...
    • a013839
    • Joined on 06-05-2007, 4:27 PM
    • Posts 1

     

    How can I include more than one class in a page.aspx

    I can access to a class called Flight.cs writing this

    <%@ Page Language="C" src="Fligth.cs" mce_src="Fligth.cs" %>

    This works but i don´t know if it is the best way.

    But I want to include a class called company that is in the file company.cs
    How can I do it?

    Thank your

  • Re: Include files .cs in a page .aspx

    06-05-2007, 12:50 PM
    • Loading...
    • jackyang
    • Joined on 11-16-2006, 7:27 PM
    • Canada
    • Posts 420

    It's better you can extract common methods/event handlers out of the company class, making them into a shared class that support all pages, and reference the new class methods in your flight codebehind.

    Jack Yang
    .NET Developer
  • Re: Include files .cs in a page .aspx

    06-05-2007, 2:47 PM
    Answer

    You should just be able to put company.cs into your App_Code folder. 

Page 1 of 1 (3 items)
Microsoft Communities
Page view counter