Click here to Skip to main content
14,606,383 members
Rate this:
Please Sign up or sign in to vote.
See more:

This is my code..

Link file shows error cannot be nested within element 'form'

please help me...

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ItemMaster.aspx.cs" Inherits="Master_ItemMaster" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<asp:Content ID="Content1" runat="server"


<link rel="stylesheet" href="~/Styles/TabsStyle.css" type="text/css" />

<asp:scriptmanager ID="Scriptmanager1" runat="server"></asp:scriptmanager>
Thanks7872 23-Oct-13 7:53am
Master page mark up should be like normal page but just with ContentPlaceHolders. Check your <form> tag is well formed at Master Page.
Member 10222278 23-Oct-13 7:58am
Sorry, i don't know understand what you saying..

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

link tag require head tag.So
place a holder inside head tag in master page.
<head runat="server">

<asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server">

Now your child page have two place holders

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
      --your styles and scripts

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

----your contents

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100