Skip to content

Web form call issue

Sie Ste

Asked Jun 29, 2012, 1:39 PM EDT2 answers
Share
LinkedInX
In a C# 2010 web form application, I am having a problem with the master pages loading correctly. I am getting the following error: "Error1Could not load file or assembly 'MasterPages' or one of its dependencies. The system cannot find the file

specified.C:\sub\TestMasterPage.ascx1".
  To fix this problem I want to determine the hierarchy of the master pages so I can determine why this particular item is being

called.This way I will know the calling order of how this item is being called by;
  I know the following:

1.  I know this item is called by TestPage.aspx due to the code listed below:
<%@ language="c#" debug="true" trace="false" %>
<%@ Register TagPrefix="mp" namespace="Microsoft.Web.Samples.MasterPages" assembly="MasterPages" %>

<script runat="server">
    void ClickedCapitalize(object o, EventArgs e) {
        capitalized.Text = Server.HtmlEncode(tb1.Text.ToUpper());
    }

    void SayHello(object o, EventArgs e) {
        name.Text = Server.HtmlEncode(tb2.Text);
    }
</script>

<mp:contentcontainer runat="server" MasterPageFile="sub/TestMasterPage.master"/>

</mp:contentcontainer>

2.  The namespace="Microsoft.Web.Samples.MasterPages" is calling this item based upon the statement above.
That code is in a member called: "MasterPages.cs".

Thus can you tell me what I need to do to solve this problem?

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Hi,
    The info provided is not clear.
    Are you adding that user control to that Page
    is the page includes the masterpage

    Thanks
    Wall Stickers
    0
  • 0
    This code I am referring to is in the source code that the contract shop gave to my company. I would think this could would interference with the actual master pages that are generated with the exsiting .net 2010 code. do you agree?
    0