Click here to Skip to main content
15,881,967 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

This is my code..

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

please help me...

XML
<%@ 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"
    contentplaceholderid="ContentPlaceHolder2">

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

<asp:scriptmanager ID="Scriptmanager1" runat="server"></asp:scriptmanager>
Posted
Comments
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

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

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


Now your child page have two place holders

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



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

----your contents
</pre>
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900