Saturday, April 18, 2009

Accessing the properties of the event sender

I was Having two Controls in the Sender one dropdown list and other is a Radio Button List
the Access the object Sender

if (sender is DropDownList)
hiddenSelectedOptionID.Value = ddlOptions.SelectedValue;
if (sender is RadioButtonList)
hiddenSelectedOptionID.Value = rblTypes.SelectedValue;

No comments:

Post a Comment