Posted on: 3/19/2014 6:32:59 AM | Views : 543

I have created a questionnaire with questions (label) and answer (can be textbox, dropdown, radiobuttonlist etc). The questionnaire is created dynamically. I have also created extensions for textbox, dropdown and radiobuttonlist.
It works find if I cast the type to the control say
string result = ((RadioButtonList)ctrl).Get();   -- extension will return ctrl.SelectedValue string result = ((DropDownList)ctrl).Get(); -- extension will return ctrl.SelectedValue string result = ((TextBox)ctrl).Get(); -- extension will return ctrl.Text
Is there any way that I don't need to cast the control to a particular type and call the Get() function? Say
string result = ctrl.Get()
Also, if the control is not a webcontrol, but a usercontrol. How do I get the type?
Thanks,

Go to the complete details ...