I am currently learning ASP and am struggling to get any of the below scenarios to work and not sure how to correctly write the variables in order for them to work. Also would this be the best way to write this type of code or is there an easier, more effective way to do the same thing?
Looking forward to your responses.
Example 1 - website urls
<%
dim url1, url2, url3
url1="http://www.google.com"
url2="http://www.yahoo.com"
url3="http://www.geocities.com"
%>
<% if url="google" then response.write(& url1) end if %>
<% if url="yahoo" then response.write(& url2) end if %>
<% if url="geocities" then response.write(& url3) end if %>
Example 2 - css code
<%
dim div1, div2, div3
div1="<div style='width:100px; height:100px; background:red;'>Red Box 100x100</div>"
div2="<div style='width:100px; height:100px; background:blue;'>Blue Box 100x100</div>"
div3="<div style='width:100px; height:100px; background:green;'>Green Box 100x100</div>"
%>
<% if url="red" then response.write(& div1) end if %>
<% if url="blue" then response.write(& div2) end if %>
<% if url="green" then response.write(& div3) end if %>
Red Box 100x100
"
div2="
Blue Box 100x100
"
div3="
Green Box 100x100
"
%>