What you are doing is mixing HTML with ASP.
You should be doing something like this:
Green = ASP
Red = HTML
<% If Cdate <= FGdate1 then %> <img border="0" src="images/site/games/01.png" width="169" height="51"> <% end if %> |
How ever, if you want to do it in the style that you did above you would do it like so:
<% If Cdate <= FGdate1 then Response.Write("<img border=""0"" src=""images/site/games/01.png"" width=""169"" height="51"">") end if %> |
To stop the HTML's quotes from interfering with the ASP string you use double quotes to escape them as you can see in the example above.
Below is an example of HTML inside ASP but with an ASP Variable in the middle, note the colour changes.
<% If Cdate <= FGdate1 then
Response.Write("<img border=""0"" src=""images/site/games/" & FGdate1 & ".png"" width=""169"" height="51"">") end if %> |
Hope that helps.
PS: if you wanted the whole file name to be an ASP variable you would need 3 quotes together, one for the ASP and two for the HTML, just image the '.png' part not there and you will see what I mean.