Solved

Could not open in Design view.  Place quotes around a '<% %>' block used as an attribute value or within a <SELECT> element.

Posted on 2004-10-16
7
780 Views
Last Modified: 2013-11-19
MS Visual Studio.NET 2002
I can't view this file in design view in Visual Studio.

C:\Inetpub\wwwroot\Community\whatsnew.aspx

The solution compiles and runs with no errors or warnings.



When I click on Design view, it shows a OK dialog box.

Could not open in Design view.  Place quotes around a '<% %>' block used as an attribute value or within a <SELECT> element.

When I my mouse over code that is underlined with a squiggly red line, it shows this tooltip.

The active schema does not support the element '%@ Register tagprefix"="community" tagname="Extras" src="global/controls/Extras.ascx" %'.
Basically the data within the square brackets.

These are the first 4 lines of the whatsnew.aspx file in html view.

<%@ Register tagprefix="community" tagname="Extras" src="global/controls/Extras.ascx" %>
<%@ Register tagprefix="community" tagname="SiteFooter" src="global/controls/SiteFooter.ascx" %>
<%@ Register tagprefix="community" tagname="SiteHeader" src="global/controls/SiteHeader.ascx" %>
<%@ Register tagprefix="community" tagname="Login" src="global/controls/Login.ascx" %>


The following tags are also underlined with the squiggly red line and it displays the following on mouse over.

The active schema does not support the element '!DOCTYPE'.
The active schema does not support the element 'HTML'.
The active schema does not support the element 'HEAD'.
The active schema does not support the element 'title'.
The active schema does not support the element 'meta'.
The active schema does not support the element 'LINK'.
The active schema does not support the element 'body'.

I can't open it in design view.
0
Comment
Question by:manoj91
  • 4
  • 3
7 Comments
 
LVL 18

Expert Comment

by:tusharashah
ID: 12331390
Do you have any select TAG inside your form? if yes then can you cut-paste code of that here...

-tushar
0
 

Author Comment

by:manoj91
ID: 12331392
there is no select tag.

here's the full html content of the whatsnew.aspx file.

<%@ Register tagprefix="community" tagname="Extras" src="global/controls/Extras.ascx" %>
<%@ Register tagprefix="community" tagname="SiteFooter" src="global/controls/SiteFooter.ascx" %>
<%@ Register tagprefix="community" tagname="SiteHeader" src="global/controls/SiteHeader.ascx" %>
<%@ Register tagprefix="community" tagname="Login" src="global/controls/Login.ascx" %>
<%@ Register tagprefix="community" tagname="Navigation" src="global/controls/Navigation.ascx" %>
<%@ Register tagprefix="community" tagname="Search" src="global/controls/Search.ascx" %>
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="whatsnew.aspx.vb" Inherits="Community.whatsnew"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
      <HEAD>
            <title>whatsnew title</title>
            <meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
            <meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
            <meta name="vs_defaultClientScript" content="JavaScript">
            <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
            <LINK href="styles.css" type="text/css" rel="stylesheet">
      </HEAD>
      <body class="SiteBody">
            <form id="Form1" method="post" runat="server" enctype="multipart/form-data">
                  <!-- Main Community Table -->
                  <table width="750" border="0">
                        <tr>
                              <td align="left" width="750" colSpan="3">
                                    <community:siteheader id="SiteHeader1" runat="server" />
                              </td>
                        </tr>
                  </table>
                  <table class="SiteTable" width="750" border="0">
                        <TR>
                              <td vAlign="top" width="150">
                                    <table width="150" border="0">
                                          <tr>
                                                <td><community:Search id="Search1" runat="server" /></td>
                                          </tr>
                                          <tr>
                                                <td><community:navigation id="Navigation1" runat="server" /></td>
                                          </tr>
                                          <tr>
                                                <td width="150"><community:login id="Login1" runat="server" NAME="Login1"></community:login></td>
                                          </tr>
                                    </table>
                              </td>
                              <td id="sectionItems" vAlign="top" width="400" runat="server">
                                    <p>updated sections data list now being displayed</p>
                                    <asp:DataList id="UpdatedSectionsDataList" runat="server">
                                          <ItemTemplate>
                                                <a href="default.aspx?Section=<%#Container.DataItem.PrimaryKey1%>">
                                                
                                                      <!-- section name Section=8.  Global Section=8-->
                                                      <%#Container.DataItem.Name%>
                                                      Section=<%#Container.DataItem.PrimaryKey1%>
                                                      
                                                      <!-- mk p112 type of content in each section-->
                                                      <asp:Repeater ID="ModuleIconsRepeater" DataSource="<%#Container.DataItem.SectionItems%>" Runat="server">
                                                            <ItemTemplate>
                                                                  <img src=Images/ModuleIcons/<%#Container.DataItem.ModuleView.CommunityModule.Name%>.png" border="0" alt="<%#Container.DataItem.ModuleView.CommunityModule.Name%>"/>
                                                                  
                                                            </ItemTemplate>
                                                      </asp:Repeater>
                                                      <!-- mk p112 -->
                                                </a>                                                
                                          </ItemTemplate>
                                    </asp:DataList>
                              </td>
                              <td vAlign="top" width="200">
                                    <community:Extras id="Extras1" runat="server" />
                              </td>
                        </TR>
                  </table>
                  <table width="750" border="0">
                        <tr>
                              <td width="750" colSpan="3">
                                    <community:SiteFooter id="siteFooter1" runat="server" />
                              </td>
                        </tr>
                  </table>
            </form>
      </body>
</HTML>
0
 

Author Comment

by:manoj91
ID: 12331394
There won't be anything wrong with the code.
It is a configuration setting with visual studio.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 18

Expert Comment

by:tusharashah
ID: 12331400
Just found out that it could be something else also...

It will give you same error if you have something like following in your code:
  <a href=default.aspx?id=<%#container.dataitem("id")%>Some Link</a>

The correct one should be like following:
  <a href='default.aspx?id=<%#container.dataitem("id")%>'>Some Link</a>


-tushar
0
 
LVL 18

Accepted Solution

by:
tusharashah earned 400 total points
ID: 12331405
This line:
<img src=Images/ModuleIcons/<%#Container.DataItem.ModuleView.CommunityModule.Name%>.png" border="0" alt="<%#Container.DataItem.ModuleView.CommunityModule.Name%>"/>

Should be like:
<img src="Images/ModuleIcons/<%#Container.DataItem.ModuleView.CommunityModule.Name%>.png" border="0" alt="<%#Container.DataItem.ModuleView.CommunityModule.Name%>">

-tushar
0
 

Author Comment

by:manoj91
ID: 12331409
i missed a double quote at img srg ="Images
thanks tushara.
0
 
LVL 18

Expert Comment

by:tusharashah
ID: 12331416
Nice to have you going Manoj!

Thanks for A:)

-tushar
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question