Thanks JV, no its not SelectedValue I'm after..I already do something else
with that.
So this is simplified syntactically but i'd want to do something like ..
theselectedvalue = (DropDownlist)sender.SelectedValue;
anothervalue = sender.commandargument (which i cant use); //another value
sent on the selectedindexchanged event (my problem is I dont know how to send
another parameter to the event).
Its another value. I have a table with several drop downs all doing the same
thing with only one variable integer value for each..in addition to the
SelectedValue.
I could put it in the Item.Value property with a tilda ~ seperating it and
the other value then extract it with Split but its messy.
In a nutshell. Can I do the same as send CommandArgument just as I can with
ImageButton?? If the answer is no then I think tilda is my only option.
I could always do seperate functions for each drop down and call the common
code in one function.
Thanks.
"JV" wrote:
I'm puzzled about your approach. What int do you want to send? Probably an
int associated with the selected row of the DDL? If so, why bother passing
it. Just check which row is selected in your event handler.
"louise raisbeck" <lo************@discussions.microsoft.com> hi,
if i cause the onclick event to fire with an ImageButton I can send
CommandArgument which I find really handy to grab some relevant value
(which
means i can reuse code for many buttons and just check the
sender.commandargument)
i want to do the same thing with 10 dropdownlists. i.e.
onselectedindexchanged fire the same event and pass an integer each time,
thats the only diff, rest is common. At the moment I'm doing a switch case
statement on 10 drop down lists to check for the sender.id which is
obviously
much longer than just checking a parameter value. CommandArgument isnt a
member of DDL though. how do I send my own value to the event handler as I
can do with the imagebutton??