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
767 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

910 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

22 Experts available now in Live!

Get 1:1 Help Now