Solved

Radiobutton in listview

Posted on 2011-03-07
3
1,247 Views
Last Modified: 2012-05-11
Helllo folks I need some help.
I've a listview with a radiobutton (single), then run my page, and when I select one radiobutton, I can select all the other radiobutton in the listview. So I can have all selected and that's impossible.
I tried everything.

Here is my code

Thanks in advanced for any help
<asp:ListView ID="lvOfrendas" runat="server" DataSourceID="odsOfrendas" EnableModelValidation="True">
        <EmptyDataTemplate>
            <span><br /></EmptyDataTemplate>
        <LayoutTemplate >
            <asp:PlaceHolder id="itemPlaceholder" runat="server" />
        </LayoutTemplate>          
        <ItemTemplate>     

             <label>
                 <asp:HiddenField ID="HiddenImgId" Value='<%# eval("ImgIdCyO") %>' runat="server" />
                
                 <asp:RadioButton ID="rb_img"  GroupName="of"   value='<%# eval("ImgIdCyO") %>' runat="server"  />
                 
                 <asp:Image ID="Img_Ofrenda" ImageUrl='<%# "../imagenes/" & eval("ImgNombre") %>' runat="server" />
             </label>

        </ItemTemplate>
    </asp:ListView>

Open in new window

0
Comment
Question by:nkoriginal
3 Comments
 
LVL 5

Accepted Solution

by:
Kelmen earned 500 total points
ID: 35063586
10 radio buttons with 1 single same groupname, you only can pick 1
if you want to be able to select all 10, they need to have different groupname

use different groupname, and i believe you need more code to validate and properly manage them.

0
 
LVL 19

Expert Comment

by:Amandeep Singh Bhullar
ID: 35944471
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question