Forum Moderators: open
public property GetSelectedValue() as string
Get
return radiobtn.selectedindex
end get
set (value as string)
radiobtn.selectedindex=value
end set but in this case I don't know how to set that value(I can't use
usercontrol.GetSelectedValue=something as i do not know value of something)
do i need to add some event handler?
plz help me out there or suggest me is there better to way to design quiz
To work with groups of RadioButtons and SelectedIndex, it is necessary to use the RadioButtonList control (<asp:radiobuttonlist>).
[edited by: eelixduppy at 5:50 am (utc) on Nov. 26, 2008]
[edit reason] disabled smileys [/edit]
I had clearly mentioned that i am using radiobuttonlist control.
After rereading your post. Here is your code with the changes.
public property GetSelectedValue() as string
Get
return myRadioButtonList.SelectedValue
end get
set (value as string)
_SelValue = value
end set
Once the member var _SelValue is set. Use this value to set the Checked property as you create the radiobuttons. Hope this helps.
-Response