<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Web Forms</title><link>http://forums.asp.net/18.aspx</link><description>All about building ASP.NET Pages - server controls, events, validation, etc.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Radiobuttonlist Image Setting</title><link>http://forums.asp.net/thread/3351253.aspx</link><pubDate>Mon, 17 Aug 2009 09:55:56 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3351253</guid><dc:creator>chope_07</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3351253.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3351253</wfw:commentRss><description>&lt;p&gt;I know ot was too late then, but somebody might be looking for the same solution.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Maybe you could try this solution.&lt;/p&gt;&lt;p&gt;&amp;lt;asp:RadioButtonList id=&amp;quot;RadioButtonList1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&amp;nbsp;&lt;br /&gt;&amp;lt;asp:ListItem &amp;gt;&amp;nbsp;&lt;br /&gt;&amp;lt;%# &amp;quot;&amp;lt;img src=\&amp;quot;/pic_directory_here/&amp;quot; + &amp;nbsp;fixpicture(Container.DataItem(&amp;quot;pic_name_here&amp;quot;).ToString()) + &amp;quot;\&amp;quot;&amp;quot; %&amp;gt;&amp;nbsp;&lt;br /&gt;&amp;lt;/asp:ListItem&amp;gt;&amp;nbsp;&lt;br /&gt;&amp;lt;/asp:RadioButtonList&amp;gt;&lt;/p&gt;</description></item><item><title>Re: Radiobuttonlist Image Setting</title><link>http://forums.asp.net/thread/2703038.aspx</link><pubDate>Thu, 23 Oct 2008 19:34:33 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2703038</guid><dc:creator>rashmi.t.agarwal</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2703038.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=2703038</wfw:commentRss><description>&lt;p&gt;Hi, I am facing the same problem. &lt;/p&gt;
&lt;p&gt;Following is my aspx code :&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;&amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;tr&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;td&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;RadioButtonList&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;ID&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;rlCards&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;runat&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;RadioButtonList&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;td&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;tr&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;aspx.cs code is :&lt;/font&gt;&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;string&lt;/font&gt;&lt;font color="#000000" size="2"&gt; img1 = &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;&amp;lt;img src=&amp;#39;images/ &amp;lt;%# fixpicture(Container.DataItem(\&amp;quot;card&amp;quot;&lt;/font&gt;&lt;font color="#000000" size="2"&gt;+Card.CardId+&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;.jpg\&amp;quot;)) %&amp;gt;&amp;#39;&amp;gt;&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;font color="#2b91af" size="2"&gt;ListItem&lt;/font&gt;&lt;font color="#000000" size="2"&gt; listItem = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;font color="#000000" size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;ListItem&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;(img1, Card.CardId.ToString());&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;rlCards.Items.Add(listItem);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I want my radiolist rlCards to be associated with the images in folder images and image name as (card+cardId).jpg&lt;/p&gt;
&lt;p&gt;Is there any way, I can get that correctly.&lt;/p&gt;
&lt;p&gt;Thanks in advance.&lt;/p&gt;
&lt;p&gt;Rashmi&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;</description></item><item><title>Re: Radiobuttonlist Image Setting</title><link>http://forums.asp.net/thread/2506105.aspx</link><pubDate>Tue, 22 Jul 2008 14:28:36 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2506105</guid><dc:creator>greatbear</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2506105.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=2506105</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;The ListItem tag should contain a &amp;quot;value&amp;quot; attribute for the image to appear. ;)&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Radiobuttonlist Image Setting</title><link>http://forums.asp.net/thread/359171.aspx</link><pubDate>Tue, 07 Oct 2003 14:23:57 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:359171</guid><dc:creator>macha27</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/359171.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=359171</wfw:commentRss><description>Try this:
&lt;br /&gt;
&lt;pre&gt;
&lt;br /&gt;

&lt;br /&gt;
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
&lt;br /&gt;
        If Not IsPostBack Then
&lt;br /&gt;
            GenImage()
&lt;br /&gt;
        End If
&lt;br /&gt;

&lt;br /&gt;
    End Sub
&lt;br /&gt;

&lt;br /&gt;
    Sub GenImage()
&lt;br /&gt;
        Dim a As ArrayList = New ArrayList
&lt;br /&gt;
        a.Add(&amp;quot;bl.gif&amp;quot;)
&lt;br /&gt;
        a.Add(&amp;quot;bc.gif&amp;quot;)
&lt;br /&gt;
        a.Add(&amp;quot;cc.gif&amp;quot;)
&lt;br /&gt;
        For Each s As String In a
&lt;br /&gt;
            RadioButtonList1.Items.Add(New ListItem(&amp;quot;&amp;lt;img src=&amp;quot;&amp;quot;&amp;quot; + s + &amp;quot;&amp;quot;&amp;quot;/&amp;gt;&amp;quot;, s))
&lt;br /&gt;
        Next
&lt;br /&gt;
    End Sub
&lt;br /&gt;
&lt;/pre&gt;
&lt;br /&gt;
and this on the html page
&lt;br /&gt;
&lt;pre&gt;
&lt;br /&gt;
&amp;lt;asp:RadioButtonList id=&amp;quot;RadioButtonList1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/asp:RadioButtonList&amp;gt;
&lt;br /&gt;
&lt;/pre&gt;
&lt;br /&gt;

&lt;br /&gt;
-ron</description></item><item><title>Re: Radiobuttonlist Image Setting</title><link>http://forums.asp.net/thread/359086.aspx</link><pubDate>Tue, 07 Oct 2003 13:11:41 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:359086</guid><dc:creator>morgation</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/359086.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=359086</wfw:commentRss><description>&amp;lt;img src='/peifootball/gifs/&amp;lt;%# Container.DataItem(&amp;quot;team_pic&amp;quot;) %&amp;gt;' &amp;gt; 
&lt;br /&gt;

&lt;br /&gt;
I am not sure if this is what you want but this is what is generated. I am just not sure if radiobuttons can be generated from a file name retrieved from the database. It will work if i hard code the name of the file into the img src but not when i bring in the db value.
&lt;br /&gt;

&lt;br /&gt;</description></item><item><title>Re: Radiobuttonlist Image Setting</title><link>http://forums.asp.net/thread/358733.aspx</link><pubDate>Tue, 07 Oct 2003 01:03:05 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:358733</guid><dc:creator>macha27</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/358733.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=358733</wfw:commentRss><description>&lt;br /&gt;

&lt;br /&gt;
I was asking about the HTML that is rendered in the client. Look at that and see if there is an &amp;lt;img src
&lt;br /&gt;

&lt;br /&gt;
-ron</description></item><item><title>Re: Radiobuttonlist Image Setting</title><link>http://forums.asp.net/thread/358343.aspx</link><pubDate>Mon, 06 Oct 2003 18:09:47 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:358343</guid><dc:creator>morgation</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/358343.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=358343</wfw:commentRss><description>Ron,
&lt;br /&gt;

&lt;br /&gt;
  I tried this and it still will not find my images. Here is what the HTML translated to:
&lt;br /&gt;

&lt;br /&gt;
                &amp;lt;ItemTemplate&amp;gt;
&lt;br /&gt;
                    &amp;lt;asp:RadioButtonList id=&amp;quot;RadioButtonList1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;
&lt;br /&gt;
                        &amp;lt;asp:ListItem &amp;gt;&amp;amp;lt;img src='/peifootball/gifs/&amp;amp;lt;%# Container.DataItem(&amp;amp;quot;team_pic&amp;amp;quot;) %&amp;amp;gt;' &amp;amp;gt; &amp;lt;/asp:ListItem&amp;gt;
&lt;br /&gt;
                    &amp;lt;/asp:RadioButtonList&amp;gt;
&lt;br /&gt;
                &amp;lt;/ItemTemplate&amp;gt;
&lt;br /&gt;
            &amp;lt;/asp:DataList&amp;gt;
&lt;br /&gt;
 
&lt;br /&gt;
  How does the databinding work with the radiobutton list? I am only databinding the datalist.</description></item><item><title>Re: Radiobuttonlist Image Setting</title><link>http://forums.asp.net/thread/355304.aspx</link><pubDate>Thu, 02 Oct 2003 18:39:46 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:355304</guid><dc:creator>macha27</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/355304.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=355304</wfw:commentRss><description>&lt;br /&gt;
1) Your image tag is not complete. It should be:
&lt;br /&gt;

&lt;br /&gt;
&amp;lt;img src='/pic_directory_here/&amp;lt;%# fixpicture(Container.DataItem(&amp;quot;pic_name_here&amp;quot;))%&amp;gt;'&amp;gt;
&lt;br /&gt;

&lt;br /&gt;
(quote and closing tag at the end)
&lt;br /&gt;

&lt;br /&gt;
2) Did you look at (can you show us part of) the html generated when the page is rendered?
&lt;br /&gt;

&lt;br /&gt;

&lt;br /&gt;
3) Can you show us your databind() code for the radiobuttonlist?
&lt;br /&gt;

&lt;br /&gt;
4) Try this
&lt;br /&gt;

&lt;br /&gt;
&amp;lt;img src='/pic_directory_here/&amp;lt;%# Container.DataItem(&amp;quot;pic_name_here&amp;quot;)%&amp;gt;'&amp;gt;
&lt;br /&gt;

&lt;br /&gt;
 to see if there is a problem with your fixpicture method.
&lt;br /&gt;

&lt;br /&gt;

&lt;br /&gt;
-ron</description></item><item><title>Radiobuttonlist Image Setting</title><link>http://forums.asp.net/thread/355021.aspx</link><pubDate>Thu, 02 Oct 2003 15:56:03 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:355021</guid><dc:creator>morgation</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/355021.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=355021</wfw:commentRss><description>I am attempting to create a radiobuttonlist as a result of value retrieved from the db. In the db i have a name of picture file in which i will return. I want the radiobuttons to interpret this value and populate an image. I am currently doing this with an image displaying in a datagrid but not for a radiobutton. 
&lt;br /&gt;

&lt;br /&gt;
Here is what i have, but it will not retrieve the image?
&lt;br /&gt;

&lt;br /&gt;
&amp;lt;asp:RadioButtonList id=&amp;quot;RadioButtonList1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;
&lt;br /&gt;
  &amp;lt;asp:ListItem &amp;gt;
&lt;br /&gt;
   &amp;lt;img src='/pic_directory_here/ &amp;lt;%# fixpicture(Container.DataItem(&amp;quot;pic_name_here&amp;quot;)) %&amp;gt;
&lt;br /&gt;
  &amp;lt;/asp:ListItem&amp;gt;
&lt;br /&gt;
&amp;lt;/asp:RadioButtonList&amp;gt;
&lt;br /&gt;</description></item></channel></rss>