Solved

Radiobutton in listview

Posted on 2011-03-07
3
1,231 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

789 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