using IIf in a gridview control
<p>I am trying to change the image url of an image control based on condition inside gridview below is my markup:</p>

<pre><code>&lt;asp:TemplateField HeaderText="Status"&gt;
                                                &lt;ItemTemplate&gt;
                                                    &lt;asp:Image ID="Image1" runat="server"
                                                     ImageUrl='&lt;%# IIf(CDate(Eval("startdate")) &lt; CDate(Eval("expdate")),"~/iWebmallManager/Images/bullet_red.png","~/iWebmallManager/Images/bullet_green.png" %&gt;'
                                                     /&gt; 
                                                &lt;/ItemTemplate&gt;

                                                &lt;HeaderStyle HorizontalAlign="Left" /&gt;
                                                &lt;ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" /&gt;
                                            &lt;/asp:TemplateField&gt;
</code></pre>

<p>The IIf statement didn't work. i dont know what I am doing right please help</p>
