L
lupina
Hi
I'm making web user control in ASP .NET 2.0 (TextBox + Button). It works
allright, but I need to add property and event to it, that would be visible
in VS Designer.
With property I havn't any troubles:
using System.ComponentModel;
private string message;
[Category("New"),Browsable(true)]
public string Message
{
set { this.message = value; }
get { return this.message; }
}
but, when I add event, it isn't visible in designer:
[Category("New"), Browsable(true)]
public event EventHandler Check;
protected void OnCheck(EventArgs e)
{
if (Check != null)
{
Check(this, e);
}
}
protected void ButtonCheck_Click(object sender, EventArgs e) // button
in my user control
{
OnCheck(e);
}
When I click on propeties of myUserControl (added to page) - I can't see any
events (lightning is invisible).
What I did wrong, and why I see property, but can't see event?
PS: when I do the same control but as WindowsControlLibrary, and next add to
windows form, I see my new added event without any troubles.
( but my control inherits from uciLabelPlusI :
System.Windows.Forms.Label)
I'm making web user control in ASP .NET 2.0 (TextBox + Button). It works
allright, but I need to add property and event to it, that would be visible
in VS Designer.
With property I havn't any troubles:
using System.ComponentModel;
private string message;
[Category("New"),Browsable(true)]
public string Message
{
set { this.message = value; }
get { return this.message; }
}
but, when I add event, it isn't visible in designer:
[Category("New"), Browsable(true)]
public event EventHandler Check;
protected void OnCheck(EventArgs e)
{
if (Check != null)
{
Check(this, e);
}
}
protected void ButtonCheck_Click(object sender, EventArgs e) // button
in my user control
{
OnCheck(e);
}
When I click on propeties of myUserControl (added to page) - I can't see any
events (lightning is invisible).
What I did wrong, and why I see property, but can't see event?
PS: when I do the same control but as WindowsControlLibrary, and next add to
windows form, I see my new added event without any troubles.
( but my control inherits from uciLabelPlusI :
System.Windows.Forms.Label)