Identify Clicked Button

2 posts, 1 answers
  1. Kumar
    Kumar avatar
    46 posts
    Member since:
    Sep 2010

    Posted 21 Oct 2010 Link to this post

    Hi,

    I am using RADToolBar.I have filled RADToolBar with 3 RADToolBarButton Items which have text as Copy,Paste,Cut

    I want to know which button is clicked on server side and want to dispaly in a label

    like "Copy" Button is Clicked.
    How can i do this
  2. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 21 Oct 2010 Link to this post

    Hi Kumar,


    The following code describes how to achieve this.

    Code:
    protected void RadToolBar2_ButtonClick(object sender, RadToolBarEventArgs e)
    {
        Label1.Text = e.Item.Text.ToString();
        RadToolBarButton clickedButton = (RadToolBarButton)e.Item;
    }



    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top