doDefaultAction is not triggered in web control designer

Discussion in 'ASP .Net Web Controls' started by greg, Mar 12, 2005.

  1. greg

    greg Guest

    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
     
    greg, Mar 12, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve Pan
    Replies:
    1
    Views:
    411
    Fred W
    Nov 6, 2003
  2. John Smith
    Replies:
    6
    Views:
    6,776
    John Smith
    Jun 20, 2006
  3. Steve B.
    Replies:
    4
    Views:
    975
    Cheryl D Wise
    Jun 1, 2007
  4. Kika
    Replies:
    2
    Views:
    627
    bruce barker
    Jan 17, 2008
  5. Kika
    Replies:
    0
    Views:
    132
Loading...

Share This Page