Using If Else in HTML page inside <%# %>tags
<p>I have to set image on the basis of fields value coming from db. I want it to achieve via. tags &lt;%# %>. For example i have collection binded with grid. It has a Field called Online which is boolean. So if the value of Online is true then the green.png will be set as path of asp:image control else grey.png will be the path of the asp: image control.</p>
