Raising DataGrid events

asp.net Saudi Arabia
  • 17 years ago

    I'm trying to fire multiple Click events from one click event, but I can't seem to do it from code.
    RaiseEvent doesn't fire click events.
    The main problem I have is that the Controls are created in a Datagrid and isn't created until runtime, so I use:

    Code:
    CType(me.FindControl("imgBtn"), imageButton).Click()
    but it gives me an error: Quote:
    'Public Event Click(sender As Object, e As System.Web.UI.ImageClickEventArgs)' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.

    I know that you can somehow use the BubbleEvent, but I'm not exacly sure how.


    Can anybody help me?

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“If Java had true garbage collection, most programs would delete themselves upon execution.” - Robert Sewell