Web Hosting, Design, & Coding forum

General discussion

VS 2005 (C#): Adding hyperlink to radio button list item

by Josh K / August 15, 2007 4:16 AM PDT

Using C# in .NET 2.0 (Visual Studio 2005). I have a radio button list of cell phone models. Within this list I have hyperlinks to images of the phones and of the ESNs (serial numbers) of the phones to help the users identify which phone they have. My ListItem code looks like this:

<asp:ListItem Value="Sprint Kyocera">Sprint Kyocera <a href="images/Sprint_Kyocera.jpg" target="_blank">(image of phone)</a> <a href="images/Sprint_Kyocera_ESN.jpg" target="_blank"> (image of ESN)</a></asp:ListItem>

When i build my project I get a validation error saying "Error 1 Validation (Internet Explorer 6): The element 'a' cannot be nested within the element 'listitem'."

The page still loads and works just fine but I have to rebuild that section of code every time I go back into the designer because of this error.

I need to have the hyperlinks next to the text for each phone model name. How can I do this properly?

Discussion is locked
You are posting a reply to: VS 2005 (C#): Adding hyperlink to radio button list item
The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our CNET Forums policies for details. All submitted content is subject to our Terms of Use.
Track this discussion and email me when there are updates

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

You are reporting the following post: VS 2005 (C#): Adding hyperlink to radio button list item
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Popular Forums
Computer Help 51,912 discussions
Computer Newbies 10,498 discussions
Laptops 20,411 discussions
Security 30,882 discussions
TVs & Home Theaters 21,253 discussions
Windows 10 1,672 discussions
Phones 16,494 discussions
Windows 7 7,855 discussions
Networking & Wireless 15,504 discussions


Get live TV over the internet

Say goodbye to cable -- check out the top five live TV streaming services available now.