asp.net radio button grouping

后端 未结 10 458
余生分开走
余生分开走 2020-12-05 09:47

I am currently having an issue with radio buttons and grouping. I have an asp radio button within a repeater control. I have the group name attribute set to \"Customer\". Wh

10条回答
  •  独厮守ぢ
    2020-12-05 10:20

    I did this:

    $("input:radio").attr("name", $("input:radio").first().attr("name"));
    

    Why? because if you replace the name property for any string you want, you will get an 'not found error'. So, you need to get the name of the first radiobutton, and rename all of them with that name. It works like a sharm ;)

提交回复
热议问题