Hi all:
I am trying to create a dynamic image tag in an HTML file using ASP. I am kind of a beginner and am having issues with the code.
Here is the issue
The code is as follows:
<% If Request.QueryString("CID")="LF" And left(Request.QueryString("TID"),2)="JL" Then Response.Write("<img src=""categories/companies/longandfoster/jl/img/order/")&Response.Write(Request.QueryString("image"))&Response.Write("""alt=""front preview"" /> ")
ElseIf Request.QueryString("CID")="LF" And left(Request.QueryString("TID"),2)="OH" Then
Response.Write("<img src=""categories/companies/longandfoster/oh/img/order/")&Response.Write(Request.QueryString("image"))&Response.Write("""alt=""front preview"" /> ")
End IF
%>
The CID that is being passed to the page is LF and the TID is L001
The result that I am getting is
0001.jpg"alt="front preview" /> <img src="categories/companies/longandfoster/oh/img/order/
I want
<img src="categories/companies/longandfoster/oh/img/order/0001.jpg" alt="front preview" />
as the result.
Could you please verify the above code and let me know whats wrong.
Thanks a lot.
I am trying to create a dynamic image tag in an HTML file using ASP. I am kind of a beginner and am having issues with the code.
Here is the issue
The code is as follows:
<% If Request.QueryString("CID")="LF" And left(Request.QueryString("TID"),2)="JL" Then Response.Write("<img src=""categories/companies/longandfoster/jl/img/order/")&Response.Write(Request.QueryString("image"))&Response.Write("""alt=""front preview"" /> ")
ElseIf Request.QueryString("CID")="LF" And left(Request.QueryString("TID"),2)="OH" Then
Response.Write("<img src=""categories/companies/longandfoster/oh/img/order/")&Response.Write(Request.QueryString("image"))&Response.Write("""alt=""front preview"" /> ")
End IF
%>
The CID that is being passed to the page is LF and the TID is L001
The result that I am getting is
0001.jpg"alt="front preview" /> <img src="categories/companies/longandfoster/oh/img/order/
I want
<img src="categories/companies/longandfoster/oh/img/order/0001.jpg" alt="front preview" />
as the result.
Could you please verify the above code and let me know whats wrong.
Thanks a lot.