locked
ASP.NET Web Applicaiton Project Master Page and Content in Designer mode issue --- Is there a fix? RRS feed

  • Question

  • I am really glad I found the following blog which fixes the following problem - http://social.expression.microsoft.com/Forums/en-US/web/thread/7eb5b113-1b23-4b0e-8de3-b60daa632319  ---   In the threads it refers to VS 2010.

    Problem - Working with a Maser Page and Content Pages the designer mode displays :

    "Error Creating Control - ContentPlaceHolder1
    Object reference not set to an instance of an object"

     

    Solution (But has to be done everytime you reopen Visual Studio to work on project (non-productive)) -

    I have this same issue in Visual Studios 2010. I have found a work-around, but not a permanent fix.

    When you get the error creating contentPlaceHolder1 go to the aspx page holding the html and doing the following usually fixes it.

    Delete 1 letter from the following (Why does this work????):

    Inherits="whateverPage"                 After Delete:             Inherits="whateverage"                  "Save"

    ChangeBack          Inherits="whateverage"                  After changeback            Inherits="whateverPage"                "Save"

    This usually allows the error to clear up and display in the designer. I don't know if your tools are similar enough that this would help you or not, but just a suggestion. Unfortunately, it seems I have to do this any time I open the project each day for the first time, Kind of a pain, but at least it fixes it so I can keep working in design mode.

    --------------------------IS THIS A BUG IN VISUAL STUDIO 2010------------------------------

    More details on my project.   Target=Framework 4.0; AJAX Control Toolkit April 2011 Release; Enterprise Library=5.0.414.0

    Template: ASP.NET Web application, C#

    Would really like to know how to get this fixed.  Never had proplems in Visual Studio 2008.


    Moojjoo MCP, MCTS
    MCP Virtual Business Card
    http://www.mmebs.com
    • Moved by Andrew.Wu Tuesday, June 21, 2011 2:39 AM (From:Visual Studio Setup and Installation)
    Monday, June 20, 2011 1:55 PM

All replies

  • Hi moojjoo,

    It appears that your question is more related with ASP.NET, you are more likely to get more efficient responses to ASP.NET issues at http://forums.asp.net where you can contact ASP.NET experts.

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who the forums regularly can either share their knowledge or learn from your interaction with us.

    Thank you for your understanding.

    Sincerely,


    Andrew Wu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, June 21, 2011 2:38 AM
  • How would this be mor appropriate with ASP.NET.   This is a Visual Studio issue.   The pages are not showing up correcting in Visual Studio "Designer" mode until I trick it with the page inherited.
    Moojjoo MCP, MCTS
    MCP Virtual Business Card
    http://www.mmebs.com
    Tuesday, June 21, 2011 1:48 PM
  • Again I am still looking for this issue with Visual Studio 2010 and ASP.NET Web forms.  I will post to ASP.NET as well.
    Moojjoo MCP, MCTS
    MCP Virtual Business Card
    http://www.mmebs.com
    Wednesday, July 20, 2011 2:04 PM