Problems with derived web control
I've created a new Label web control which I derived from the
class. In the derived class I've replaced the Text function to return the
from a resource file. This all works fine if I start the web application.
My problem is that these derived controls aren't displayed in the design
the html designer. Instead the designer shows an error box for each control.
The error message comes from an InvalidCastException exception.
In the aspx file I added the following server tag:
<%@ Register TagPrefix="cnm" Namespace="cnm.library.web.ctrl"
and all controls are create like this:
<cnm:Label id="lblTest" style="Z-INDEX: 101; LEFT: 20px; POSITION: absolute;
TOP: 22px" runat="server"></cnm:Label>
The code of the derived Label control:
public class Label : System.Web.UI.WebControls.Label
public override string Text
base.Text = value;
Thanks in advance
|All times are GMT. The time now is 10:53 AM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.