I think you may be able to do it like this, although it's not something I've tried before:-
Code:
Sub sortbuttons_OnClick(ByVal s As Object, ByVal e As EventArgs)
Dim mybutton As LinkButton = s
Dim sortby As String = mybutton.CommandArgument
.
.
.
.
.
End Sub
Provided the CommandArgument of each LinkButton is set to the sortby value you want and assuming you're using LinkButtons for all of them. If you're using anything else, you may have to change the object type in the instance it creates.
Like I say, I haven't tried this before, but in theory I think it should work.
Let me know how you get on....
richyrich, July 17th, 2008 06:16 AM
Bookmarks