Advertisement

04.15.2008 at 06:04PM PDT, ID: 23325749
[x]
Attachment Details

ASP.NET runtime error: Only Content controls are allowed directly in a content page that contains Content controls.

Asked by twvertal in Cascading Style Sheets (CSS), Hypertext Markup Language (HTML), Programming for ASP.NET

Tags: ,

I am trying to use a style sheet (perhaps errantly) in an asp page using a ref link... compiliing in VS2005.  The style sheet reference: <link href="stylesheet1.css" type="text/css" rel="stylesheet" />
Can I reference a stylesheet?  If so how?
Page Code:
<%@ Page Language="C#" MasterPageFile="~/ToolBarMasterPage.master" AutoEventWireup="true" CodeBehind="Page4.aspx.cs" Inherits="CommonToolbar1.Page4" Title="Untitled Page 4"%>

<link href="stylesheet1.css" type="text/css" rel="stylesheet" />

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"
<script runat="server">

    protected void menuTabs_MenuItemClick(object sender, MenuEventArgs e)
    {
        multiTabs.ActiveViewIndex = Int32.Parse(menuTabs.SelectedValue);
    }
</script>

 <table style="height:400px;width:100%"  cellpadding="0" cellspacing="0" ><tr style="height:100px"><td align="center" style="height:20px; background-color: gainsboro;">
     <span style="font-size: 14pt; font-family: Verdana">Content Area Page 4
     my blog
    <asp:Menu
        id="menuTabs"
        CssClass="menuTabs"
        StaticMenuItemStyle-CssClass="tab"
        StaticSelectedStyle-CssClass="selectedTab"
        Orientation="Horizontal"
        OnMenuItemClick="menuTabs_MenuItemClick"
        Runat="server">
        <Items>
        <asp:MenuItem
            Text="Tab 1"
            Value="0"
            Selected="true" />
        <asp:MenuItem
            Text="Tab 2"
            Value="1"/>
        <asp:MenuItem
            Text="Tab 3"
            Value="2" />
        <asp:MenuItem
            Text="Tab 4"
            Value="3" />
           
        </Items>
    </asp:Menu>      
    <asp:MultiView
        id="multiTabs"
        ActiveViewIndex="0"
        Runat="server">
        <asp:View ID="view1" runat="server">
        Contents of first tab      
        </asp:View>
        <asp:View ID="view2" runat="server">      
         <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
             DataSourceID="SqlDataSource2">
         </asp:GridView>
            <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:SuntreckoConnectionString2 %>"
                SelectCommand="SELECT [Coach_ID], [Coach_Name], [Coach_Org_ID], [Coach_Gen_ID], [Coach_Notes] FROM [Coach]"></asp:SqlDataSource>
       
        </asp:View>
        <asp:View ID="view3" runat="server">  
        Contents of third tab  
        </asp:View>
                <asp:View ID="view4" runat="server">
        Contents of fourth tab
        </asp:View>
    </asp:MultiView>    
     </span>
 </td></tr> <tr style="height:380px">
 <td align="center" style="height:500px; background-color: gainsboro;">
  <asp:Label ID="lblInfo" runat="server" BackColor="#FFFFC0" Font-Bold="True" Font-Italic="True" Font-Names="Arial Narrow" Font-Size="Medium" ForeColor="Blue" Width="225px"></asp:Label>
</td></tr></table>
</asp:Content>
Start Free Trial
[+][-]04.15.2008 at 07:15PM PDT, ID: 21364255

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.15.2008 at 07:21PM PDT, ID: 21364272

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.15.2008 at 07:24PM PDT, ID: 21364292

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.15.2008 at 07:27PM PDT, ID: 21364305

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.15.2008 at 07:48PM PDT, ID: 21364404

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.15.2008 at 07:53PM PDT, ID: 21364419

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.15.2008 at 08:03PM PDT, ID: 21364468

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.15.2008 at 08:19PM PDT, ID: 21364528

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.15.2008 at 08:33PM PDT, ID: 21364581

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Cascading Style Sheets (CSS), Hypertext Markup Language (HTML), Programming for ASP.NET
Tags: asp.net html, IE6.x
Sign Up Now!
Solution Provided By: NesFuratu
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628