Problem with composite control

M

Mark Goldin

I have created a Web composite control that consists of a label and
Infragistics WebMaskEdit text box.
When I drop that control on my form I have "Error Creating Control ..."
thing.
When I move a mouse over the control I see the following:
"Could not load type CompositeControls.TextBoxLabel from assemply
CompositeControls ..."
Can somebody help, please?

Here is source code:
using System;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.ComponentModel;

using Infragistics.WebUI.WebDataInput;

namespace CompositeControls

{

// <summary>

// Summary description for TexBoxLabel

// </summary>

[DefaultProperty("Text"),

ToolboxData("<{0}:TexBoxLabel runat=server></{0}:TexBoxLabel>")]

public class TextBoxLabel : System.Web.UI.WebControls.WebControl,
INamingContainer

{

private Label label;

private WebMaskEdit textBox;


[Bindable(true), Category("Appearance"), DefaultValue("Label")]

public string LabelText

{

get

{

EnsureChildControls();

return label.Text;

}

set

{

EnsureChildControls();

label.Text = value;

}

}


[Bindable(true), Category("Appearance"), DefaultValue(" ")]

public string Text

{

get

{

EnsureChildControls();

return textBox.Text;

}

set

{

EnsureChildControls();

textBox.Text = value;

}

}

protected override void CreateChildControls()

{

label = new Label();

label.Height = 20;

label.Width = 60;

label.Font.Size = 8;

this.Controls.Add(label);

textBox = new WebMaskEdit();

this.Controls.Add(textBox);

}

}

}
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top