For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > January 2006 > 2.0 Control in Seperate Assembly Inside Custom Control









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author 2.0 Control in Seperate Assembly Inside Custom Control
mwieder@gmail.com

2006-01-31, 7:03 pm

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" %>
snip
<ui:errorwindow clientsideid="cmnErrWin" runat="server" id="csError"
targetid="mainCnt" />
snip

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?

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com