Expand Minimize
0 out of 2 rated this helpful - Rate this topic

Could not open in Design view. Reverse or escape quotes inside a '<% ..."value"... %>' block.

Visual Studio .NET 2003

Before switching to Design view, the HTML Designer examines any code embedded within attribute values or <SELECT> elements. If this message is displayed, both an embedded <% %> block and one or more values inside it are enclosed in the same kind of quotes.

To respond to this message

  • If the embedded '<% %>' block is enclosed in single quotes ('), place double quotes (") around any value that must be quoted inside the block.

    -or-

  • If the embedded "<% %>" block is enclosed in double quotes ("), place single quotes (') around any value that must be quoted inside the block.

    When quoted values inside the <% %> block are enclosed in quotes different from those around the block itself, you can switch to Design view.

Example

In the following markup, an embedded '<% %>' block retrieves the address of a Web page to complete the href attribute of an <a> link element:

<a href='<%# fsURL("MyPage") %>'>Go</a> 

Here is another valid syntax for the same statement. In this case, double quotes are placed around the embedded "<% %>" block, and single quotes around the parameter 'MyPage' that occurs within the block:

<a href="<%# fsURL('MyPage') %>">Go</a> 

This enables you to switch to Design view. When you view this page in a Web browser and click this link, the fsURL("MyPage") handler runs.

See Also

HTML Markup: A Element, a Object | HREF Attribute, href Property | SELECT Element, select Object | DHTML References

Embedded Code: Data Binding Expression Syntax | Code Render Blocks | Web Forms Syntax | ASP.NET Syntax | HttpResponse.Write Method | ASP Scripting Optimization

HTML Designer: <A> Property Pages Dialog Box | Options that Affect Existing HTML, CSS, or XML Markup | Web Forms Pages | Web Forms Tab, Toolbox | Editing HTML | Navigating in the Document Outline Window | Switching to Design View

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.