Anil Kumar

Anil Kumar

  • 688
  • 1.2k
  • 129.4k

getting error in You can only have one

Feb 17 2013 11:59 PM
Hello..

i m getting error in this webpage..\


<%@ Page Title="" Language="C#" MasterPageFile="~/site.master" AutoEventWireup="true" CodeFile="Blog.aspx.cs" Inherits="Blog" %>
<%@ Register Src="~/History.ascx" TagPrefix="uc4" TagName="History" %>
<%@ Register Src="~/Short_desc.ascx" TagPrefix="uc5" TagName="Short_desc" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head"  runat="server">
    <style type="text/css">
        .style3
        {
            width: 100px;
        }
        .style4
        {
        max-width:300px;
        max-height:200px;
           
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <asp:Repeater ID="RepDetails" runat="server" 
    onitemcommand="RepDetails_ItemCommand">
<ItemTemplate>
<table style="height: 189px; width: 669px">
<tr>
<td class="style3"><asp:Label ID="lbldate" runat="server" 
        Text='<%#Eval("postdate") %>' style="background-color: #0066FF"/></td>
<td><asp:Label ID="lblshort_desc" runat="server" Text='<%#Eval("short_desc") %>'/></td>

</tr>

<tr>
    
<td class="style3"></td>
<td>
    
    <asp:Image ID="Image1" runat="server" ImageUrl='<%# "~/images/"+ Eval("image").ToString() %>' CssClass="style4"/>
</td>

</tr>

<tr>
<td class="style3"></td>
<td><asp:Label ID="lbldetails" runat="server" Text='<%#Eval("details") %>'/></td>

</tr>
<hr />
</table>
</ItemTemplate>
    </asp:Repeater>
    
</asp:Content>

<asp:Content ID="Content3" runat="server" 
    contentplaceholderid="ContentPlaceHolder2">
    <uc4:History  runat="server" ID="History" />
    <uc5:Short_desc runat="server" ID="Short_desc" />
</asp:Content>


i m getting error when i m getting error.

You can only have one <head runat="server"> control on a page.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Web.HttpException: You can only have one <head runat="server"> control on a page.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.





Answers (3)