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" %>
.style3
{
width: 100px;
}
.style4
{
max-width:300px;
max-height:200px;
}
onitemcommand="RepDetails_ItemCommand">
Text='<%#Eval("postdate") %>' style="background-color: #0066FF"/> | |
contentplaceholderid="ContentPlaceHolder2">
i m getting error when i m getting error.
You can only have one 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 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. |
3 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

Upamanyu Roy ChoudhuryPosted Feb 20, 2013, 2:35 PM
When you use Master page and child page or content page, the content page should not have any runat attirbute and body as the master page already contains the tag.
Lok at the following discussion links to have a deeper concept
http://forums.asp.net/t/870352.aspx/1
http://stackoverflow.com/questions/2910771/a-page-can-have-only-one-server-side-form-tag
Please keep me posted
Jignesh TrivediPosted Feb 20, 2013, 4:21 AM
hi,
if you are using master pages, do not use
inside child page... you can add necessary header tags ini think proble with below lines.
.....
hope this will help you.
Deepak VermaPosted Feb 20, 2013, 12:47 AM