Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > ImageButton doesn't handle events in a UserControl?

Reply
Thread Tools

ImageButton doesn't handle events in a UserControl?

 
 
SyntaxError
Guest
Posts: n/a
 
      01-09-2004
I'm unable to get a ImageButton placed in a custom user control to handle the OnCommand event.. but, when the exact same code is placed in the webform.. it works perfectly?

An example of what I'm trying to do:

<asp:imageButton imageUrl="~/images/sortLeft.gif" onCommand="sortBulletins" alternateText="sort ascending" commandArgument="memberEmail ASC" runat="server" ID="Imagebutton3" />

When the user clicks on the ImageButton, it postbacks to a procedure "sortBulletins" in the code behind:
Sub sortBulletins(ByVal sender As Object, ByVal e As CommandEventArgs)

'viewState("sortField") = e.CommandArgument

End Sub

Any help or ideas would be greatful!
Thanks,
Robbie
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ImageButton OnClientClick Events Not Firing on Client =?Utf-8?B?RWFnbGVSZWRASGlnaEZseWluZ0JpcmRzLmNvbQ==?= ASP .Net 7 11-30-2007 09:28 PM
Events Events Events Please Help Chris ASP .Net Web Controls 0 08-30-2005 08:21 PM
Dynamically created ImageButton with events =?Utf-8?B?QnJ1Y2U=?= ASP .Net 2 04-12-2005 03:03 PM
MouseUp/MouseDown events for ASP.NET ImageButton Nathan Sokalski ASP .Net 1 02-09-2005 07:06 AM
ImageButton events stopped firing on client? Darren Clark ASP .Net 2 06-25-2004 07:33 AM



Advertisments