Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > DataList with RadioButtons + Images: How to click on the images to activate the radiobutton?

Reply
Thread Tools

DataList with RadioButtons + Images: How to click on the images to activate the radiobutton?

 
 
Luis Esteban Valencia Muņoz
Guest
Posts: n/a
 
      06-03-2005
I have a DataList, which looks a bit like this:
<aspataList id="dlstCheeseType" runat="server"
RepeatColumns="4" RepeatDirection="Horizontal"
ShowHeader="False" ShowFooter="False"
ItemStyle-VerticalAlign="Top" ItemStyle-HorizontalAlign="Center"
ItemStyle-Width="25%" Width="100%">
<ItemTemplate>
<asp:RadioButton ID="cheeseChoice" Text='<%#
Container.DataItem.Row("CheeseName") %>' Runat="server"
GroupName="cheeseGroup"/>
<br>
<asp:Image id=imgCheese Runat="server"
ImageUrl='<%# "Images/" & Container.DataItem.Row("CheeseImg") %>'
Width="100px" Height="100px">
</asp:Image>
</ItemTemplate>
</aspataList>
(sorry for the formatting )

Basically it's filled with a bunch of choices from the database, with a Name
and a graphic. The user should be able to choose one of them using the radio
button (that doesn't work properly, but that's a different question ).

My question:
How can I add something to allow the user to click on the images and
activate the RadioButtons that way? (preferably something client-side, i.e.
without posting the full form to the server)

Thanks!



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
what does this error mean `activate': can't activate activesupport (=3.0.1, runtime) for ["activerecord-3.0.1"] Junkone Ruby 2 10-27-2010 09:13 AM
Datalist with RadioButtons question Hrvoje Vrbanc ASP .Net 2 07-29-2005 07:35 AM
Datalist and Radiobuttons tshad ASP .Net 0 06-23-2005 05:10 PM
Setting up a datalist control - Item_DataBound for a datalist in a datalist Nevyn Twyll ASP .Net 8 09-09-2004 10:13 PM
Click event in a datalist to post back datalist properties Steve Lloyd ASP .Net 1 05-26-2004 04:07 AM



Advertisments