How to find checked RadioButton inside Repeater Item?

后端 未结 3 2133
一生所求
一生所求 2020-12-31 18:19

I have a Repeater control on ASPX-page defined like this:



        
3条回答
  •  再見小時候
    2020-12-31 18:41

    You could always use Request.Form to get the submitted radio button:

    var value = Request.Form["answerVariants"];
    

    I think the submitted value defaults to the id of the that was selected, but you can always add a value attribute - even though it's not officially an property - and this will then be the submitted value:

    
    

提交回复
热议问题