doDefaultAction is not triggered in web control designer

G

greg

Hi,

I designed as we control that dedrived from asp.net web button control. Then
I created a designer for this control, in the designer I orverride
DoDefaultAction methond, the problem is when i double click the button
control on at the design time, the doDefaultAction never gets called, here
are my designer code:

public class MyDesigner : System.Web.UI.Design.WebControls.ButtonDesigner
{

public override void DoDefaultAction()
{
DoMyActions();
}

}

and here is the button control code:


[Designer(typeof(MyDesigner))]
public class WebCustomControl1 : System.Web.UI.WebControls.Button
{
private string message = "Confirm1?";
[Bindable(true),
Category("Appearance"),
DefaultValue("Confirm1?")]
public string ConfirmMessage
{
get{return this.message;}
set{this.message = value;}
}

}

anything wrong with my code?

Thanks
 

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,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top