-
Design View
I can't switch to design view if I have code blocks in my html. I get the message 'Could not open design view. Quote values differently inside a '<%...."value".....%>' block'.
I thought that the <%= %> was still valid???
I am trying to do the following
<tr>
<td>URL -<a href="<%=sURL%>"><%=sURL%</a></td>
</tr>
Why is this???
Many thanks
-
I've come across this problem aswell..
It seems for whatever reason, you're not allowed to enclose <%= %> statements inside normal quotes " "
Instead, use single quotes:
<tr>
<td>URL -<a href='<%=sURL%>'><%=sURL%></a></td>
</tr>
btw, i don't know if it's just a type in the post, but you were missing a closing tag on the <%=sURL%<b>></b></a>part...
This should now fix your problem from design view.. i'm not sure why this is like this, personally i find it extremely annoying...
and worse yet, when i do something like:
<a href='Page.aspx?ID=2&Action=<%= strAction %>'>Go Here</a>
VS.NET almost always changes the & sign in the url to a .... (without the space obviously) this obviously messes up the url, and isn't correct... i'd like to know if someone's got a way around this?
Anyways, hope that helped!