you can have a parameter to the function as is DataListCommandEventArgs e
YourFunction(DataListCommandEventArgs args) and call this. passing what is
actually required would be better.
Av.
"Rob" <gu*******@hotmail.com> wrote in message
news:10*************@corp.supernews.com...
Hi,
I am creating a DataList with many CheckBoxes. When I click the
Update
button the UpdateCommand fires and my code looks at each CheckBox and
determines if it is checked or not. The way I have it now seems a bit
tedious. I thought it would make more sense to pass the CheckBox to a
Function and return whether or not it is checked.
The problem I am having is I understand (barely) how to get the
control off the DataList because I can pass the e As
DataListCommandEventArgs to FindControl. But if I make my own function, I
don't know how to pass that same argument to the FindControl. If I knew
that, then I could make my own function that looks for the CheckBox and
returns its Checked status.
So my question is, how do I pass the DataListCommandEventArgs to a
Function that is not one of the default Events? Also, any
resources/information I could read would be helpful - I am a newbie.
Thanks for your help.