Results 1 to 2 of 2

Thread: Design View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2001
    Location
    Devon, UK
    Posts
    181

    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
    Wind and waves resolves all problems.

  2. #2
    Fanatic Member Redth's Avatar
    Join Date
    May 2001
    Location
    Ontario, Canada
    Posts
    551
    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
    VB Code:
    1. & amp;
    .... (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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width