problems with Web application project, master page and app_code classes

Last post 05-22-2007 5:34 PM by biberce. 6 replies.

Sort Posts:

  • problems with Web application project, master page and app_code classes

    05-06-2007, 10:37 PM

    Hi, all

    I was reading the Visual Studio 2005 Web Application Project Option http://webproject.scottgu.com/Default.aspx. They are excellent.

    Though I'm facing probkems in two cases.

    1. If I add the master page, after that when I try to add the content page, it does not allow me to select master page option. I've to manullay remove the  html tags and put the content tag in the

    contect page.

    2. In the last tutorial to convert web site to web app project, It worked fine. But the project could not compile. I could not find the classes in the Old_App_Code directory. This is the error

    I'm getting. please help

    Error 1 The name 'PhotoManager' does not exist in the current context C:\study\webappProject\NewPersonalStarterKit\Admin\Photos.aspx.cs 24 4 NewPersonalStarterKit

  • Re: problems with Web application project, master page and app_code classes

    05-06-2007, 11:22 PM
    BTW.. I installed VS 2005 service pack
  • Re: problems with Web application project, master page and app_code classes

    05-07-2007, 11:28 PM
    Answer

    Hi sp_412000,

     

    For the first issue, you can add the content page for master page instead. To do this, please perform the steps below: 

    Right click the master page in Solution Explorer and then click "Add Content Page". Please rename the page after creating.

     

    For the second issue, based on my understanding, it’s related to the code. Please check the code first. Here are some articles which may be helpful to you.

     

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=523645&SiteID=1

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=476911&SiteID=1

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=776964&SiteID=1

     

     

    Sincerely,
    Benson Yu
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.
  • Re: problems with Web application project, master page and app_code classes

    05-08-2007, 7:53 PM

    I'm following the above help links. Though, the code that I converted was the Personal web site starter kit. I exactly followed the instructions given in Scott's tutorial.

    VS 2005 service pack 1 is good enough or I've to install this update first. http://www.microsoft.com/downloads/details.aspx?FamilyId=8B05EE00-9554-4733-8725-3CA89DD9BFCA&displaylang=en

  • Re: problems with Web application project, master page and app_code classes

    05-10-2007, 8:48 PM
    This links are not usefull.  Mostly they are pointing issues where a variable is not declared. This is kind of errors that newbie'll get. Can any body resolve my problem?
  • Re: problems with Web application project, master page and app_code classes

    05-10-2007, 9:07 PM

    Finally, I can compile the project. The solution I got is from this http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=200532&SiteID=1.

    I exclude the files that were creating errors, compile the project, close the VS 2005. Open it again and include that files, compile project, it worked.

    ISN'T IT QUALITY WORK? 

    Quality should also be maintained with every new version produced every year.

  • Re: problems with Web application project, master page and app_code classes

    05-22-2007, 5:34 PM
    • Member
      2 point Member
    • biberce
    • Member since 05-22-2007, 4:40 PM
    • Posts 1

     Hi there. I had a same problem with converting Personal Web Site project to a web app project. I've tried your solution but it didn't solve the problem (still getting error "The name 'Photo Manager' does not exist in the current context"). I have noticed that the property "Build Action" for classes in newly created (renamed) folder "Old_App_Code" is set to "Content" by default (after converting to a web app from the web site) and that was the problem. It must be set to "Compile" since all the classes in a previous "App_Code" folder (as you surely know) are automatically compiled which is not the case after renaming the folder.

Page 1 of 1 (7 items)