G
Guest
I have a form with 13 pairs of radio buttons to record yes/no answers.
Consider the following code snippet;
private void OnRBClick(object sender, System.EventArgs e)
{
RadioButton rb = (RadioButton) sender;
}
This is a generic click handler that could be used to handle click responses
from all 26 of the radio buttons on the page – providing I could
differentiate between them. Is there some way to get the control to cough up
its name? I don’t mean the name of its type like you can get through
rb.GetType().Name, I mean the name I gave in the properties window, the name
it is declared as.
If I could do that I could write a select statement to update the
appropriate column in the database, and it seems to me like that would be
more memory efficient than supporting 13 different event handlers for each of
the radio button pairs.
Bill
Consider the following code snippet;
private void OnRBClick(object sender, System.EventArgs e)
{
RadioButton rb = (RadioButton) sender;
}
This is a generic click handler that could be used to handle click responses
from all 26 of the radio buttons on the page – providing I could
differentiate between them. Is there some way to get the control to cough up
its name? I don’t mean the name of its type like you can get through
rb.GetType().Name, I mean the name I gave in the properties window, the name
it is declared as.
If I could do that I could write a select statement to update the
appropriate column in the database, and it seems to me like that would be
more memory efficient than supporting 13 different event handlers for each of
the radio button pairs.
Bill