Click here to Skip to main content
15,936,903 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
ssir !
I want to apply the masterpage to the default page in page in vs 2008.
when i copy the asp contentplaceholder block of the masterpage to the default.aspx then it shows the message that "asp contentplaceholder can only be used in masterpage."
write2varun 25-Sep-13 5:01am    
did you create the page without the master page

Error message it pretty clear,you can not use contentplaceholder in content pages. If your masterpage contains
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">

Then to place content in this contentplaceholder,in content page your code should be like
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
//your code goes here 

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