0

I am creating a table and then in every row of table I need to put different image depending on the results retrieved from the database.

ImageVariable=Image1.jpg

<"Table>
    <"TR> 
    <"TD>
        <"IMG SRC=<%=ImageVariable %>> 
    <"/td>
    <"/tr>
<"/table>

However, when I view the results, this image variable is not converted to the actual value but is considered as value itself, so my image link becomes htt://Ritesh/Imagevariable

Instead what I want is htt://Ritesh/Image1.jpg

Please assist.

1
  • What's with all of the quotes inside your markup?, e.g. <"Table>? Commented Jul 18, 2013 at 13:28

1 Answer 1

1

Do some thing like this.

public static string ImageVariable="Image1.jpg"

then write in <%=%> block

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.