2.0 Control in Seperate Assembly Inside Custom Control

Discussion in 'ASP .Net' started by mwieder, Jan 31, 2006.

  1. mwieder

    mwieder Guest

    We are in the process of converting a huge web application to 2.0. We
    are currently experiencing the following issue and can't find any
    documentation on how to solve it. Suggestions (with an eye for least
    code changes possible) are appreciated:

    In assembly MyApp.Core, we have a class MyApp.Core.ErrorWindow
    In the web project, we have MyPage.ascx which contains these 3 lines:
    <%@ Register TagPrefix="ui" Namespace="MyApp.Core"
    Assembly="MyApp.Core" %>
    <%@ Control Language="c#" Inherits="MyApp.MyPage"
    CodeFile="MyPage.ascx.cs" %>
    <ui:errorwindow clientsideid="cmnErrWin" runat="server" id="csError"
    targetid="mainCnt" />

    in MyPage.ascx.cs we have a method showError(string sError)
    {csError.ErrorMessage = sError}

    My code (which worked fine in 1.1) is failing at runtime on that last
    line, complaining the csError is null. The partial class that gets
    created should have created the csError object since it exists in the
    ascx. How come it didn't?
    mwieder, Jan 31, 2006
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.