GridView Control Image button: How to connect to a click event

Discussion in 'ASP .Net' started by keithb, Jun 5, 2006.

  1. keithb

    keithb Guest

    I need help connecting an image button in a GridView control to an event
    handler. Using the OnCommand property results in the following error:

    Error 3 'UserControls_Rem.ImageButton_Command(object,
    System.Web.UI.WebControls.CommandEventArgs)' is inaccessible due to its
    protection level C:\local_websites\btm_root\UserControls\Rem.ascx 7

    I must be doing something wrong here. Can someone offer a suggestion?

    Thanks,

    Keith
     
    keithb, Jun 5, 2006
    #1
    1. Advertising

  2. keithb

    keithb Guest

    Answering my own question, I needed to set the onRowCommand Event for the
    GridView Control. I had not noticed that the information I was using was in
    reference to the DataGrid control in ASP.NET Version 1.

    Keith


    <> wrote in message
    news:%...
    >I need help connecting an image button in a GridView control to an event
    >handler. Using the OnCommand property results in the following error:
    >
    > Error 3 'UserControls_Rem.ImageButton_Command(object,
    > System.Web.UI.WebControls.CommandEventArgs)' is inaccessible due to its
    > protection level C:\local_websites\btm_root\UserControls\Rem.ascx 7
    >
    > I must be doing something wrong here. Can someone offer a suggestion?
    >
    > Thanks,
    >
    > Keith
    >
     
    keithb, Jun 6, 2006
    #2
    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.

Share This Page