Author: Mobius5150 | Posted on: 3/7/2009 5:13:10 PM | Views : 270

Hi,

 I have a bit of a complicated problem (at least to me) What i want to do, is use a sub as an event handler for more than one control. I already know that the event handler will only be called by the  DropDownlist.selectedindexchanged event.

The thing is, that i want to remove a substring from the name of the control that created the event (sender.getType.name.tostring) then i want to use this substring to control other controls

Ex of the above:

Sender: BrakesPre 'I want to find the word before "Pre" then take this word and add a string to it

dim objString as string = "Brakes" + "Post" 'Now i want to use objString as the name of a control (The control with this name already exists on the .aspx page)

{Whatever the value of objString is}.selectedvalue 'more code here

I have this code:
Private ...

Go to the complete details ...