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
761 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
Comment Utility
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
Comment Utility
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
Comment Utility
There won't be anything wrong with the code.
It is a configuration setting with visual studio.
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 18

Expert Comment

by:tusharashah
Comment Utility
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
Comment Utility
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
Comment Utility
i missed a double quote at img srg ="Images
thanks tushara.
0
 
LVL 18

Expert Comment

by:tusharashah
Comment Utility
Nice to have you going Manoj!

Thanks for A:)

-tushar
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
The viewer will learn how to count occurrences of each item in an array.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

744 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now