Last post Apr 22, 2009 03:03 AM by Yisman
Apr 21, 2009 08:51 AM|Yisman|LINK
I have a piece of code that i want many ListViews to run throughout the app at ItemUpdated. I'm sure the same can apply to many other control-events.
How can I hook up a certain listviews ItemUpdated event to a sub in a class module?
here's my class module
Public Class ControlParts
Public Shared Sub LSVItemUpdated(ByVal sender As Object, ByVal e As ListViewUpdatedEventArgs)
Dim lsv As ListView = CType(sender, ListView)
lsv.EditIndex = -1
to my ListView's declaration I get an error that 'LSVItemUpdated' is not a member of 'ASP.admin_order_aspx'. Well, I don't want this on the page. I wan't this to be globaly accessible. I could in the code behind call the LSVItemUpdated, but that will beat
the whole point off.
Thank you very much for taking the time to answer
Apr 21, 2009 12:49 PM|DkUltra|LINK
needs to be something like
adhandler OnItemUpdated addressof LSVItemUpdated
hope this helps
Apr 22, 2009 03:03 AM|Yisman|LINK
Thanks for your post. Where do i put this code? Again, I do not want this sub run on every single ListView in the app, just where I declare it in the aspx markup.
Thanks again for your help.