Code behind file in separate folder

Discussion in 'ASP .Net' started by Pavan Apuroop, Jun 24, 2005.

  1. Hi All,

    I am creating a web application using ASP .Net 2.0 Beta 2.

    I want to place all my code behind files in a special folder (App_Code) and
    access them in my web application.

    I have done the same in ASP .Net 2.0 Beta 1. But now Beta 2 is not allowing
    me to do so.

    It is saying CodeBehind file in a special directory, which is not allowed.

    Please share your views in this regard,

    Cheers,

    Pavan
     
    Pavan Apuroop, Jun 24, 2005
    #1
    1. Advertising

  2. re:
    > I want to place all my code behind files in a special folder (App_Code)
    > I have done the same in ASP .Net 2.0 Beta 1.


    Are you sure ?

    That's strange because in Beta 1, the directory was named "Code".
    The special directory "App_Code" was introduced in Beta 2.

    re:
    > It is saying CodeBehind file in a special directory, which is not allowed.


    When you create a new class file in Beta 2,
    aren't you prompted to place the file in the App_Code directory ?

    You should be.

    However, if you are just writing code-behind ( .vb, .cs, etc. ) for an ASPX
    page, that code-behind should go in the same directory as your ASPX file.




    Juan T. Llibre
    ASP.NET MVP
    http://asp.net.do/foros/
    Foros de ASP.NET en EspaƱol
    Ven, y hablemos de ASP.NET...
    ======================

    "Pavan Apuroop" <> wrote in message
    news:%...
    > Hi All,
    >
    > I am creating a web application using ASP .Net 2.0 Beta 2.
    >
    > I want to place all my code behind files in a special folder (App_Code) and access them
    > in my web application.
    >
    > I have done the same in ASP .Net 2.0 Beta 1. But now Beta 2 is not allowing me to do so.
    >
    > It is saying CodeBehind file in a special directory, which is not allowed.
    >
    > Please share your views in this regard,
    >
    > Cheers,
    >
    > Pavan
    >
     
    Juan T. Llibre, Jun 24, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ben Miller [msft]

    Re: Code Behind vs. no code behind: error

    Ben Miller [msft], Jun 27, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    621
    Alphonse Giambrone
    Jun 28, 2003
  2. EvgueniB
    Replies:
    1
    Views:
    656
    Anthony Borla
    Dec 15, 2003
  3. Frank Fredstone
    Replies:
    1
    Views:
    460
    Jean-Francois Briere
    Jun 27, 2006
  4. Terry Olsen

    Code behind not in separate file

    Terry Olsen, Dec 1, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    383
    Laurent Bugnion
    Dec 1, 2006
  5. John

    Non-code behind to code behind

    John, Feb 19, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    509
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Feb 19, 2007
Loading...

Share This Page