Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Hello I created a application page in visual studio 2010. Now i want to mapp this to our master page. the default master page is, applicationv4.master. Now to map this to our application page? I changed in the application page for the dynamicmasterpagefile attribute in the Page directive as DynamicMasterPageFile = "~/_layouts/application.master" . After deploying the solution i am getting following error. enter image description here

How to avoid this. I searched a lot, but didn't find solution.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

I found the soulution for my problem. Following is the final markup.

<%@ Page Language="C#" DynamicMasterPageFile="~masterurl/default.master" Inherits="AppPages.Layouts.AppPages.ApplicationPage1"   EnableViewState="false" EnableViewStateMac="false"    %> 

Removed codebehind file, and added enableviewstate and enableviewstatemac attributes. Just copied from the viewlists.aspx page page directive

share|improve this answer
    
If you solved the problem stated in your original question, you should mark this answer as accepted answer to help future visitors. –  Benny Skogberg Apr 3 at 6:28

Can you try to update MasterPageFile property to new masterpage. This works perfectly fine in one of my application pages.<%@ Page language="C#" MasterPageFile="~/_layouts/MCPT/Collaboration.Master" Inherits="Collaboration.Tool.ApplicationPages.ChangePassword" EnableViewState="true" EnableViewStateMac="true"%>

share|improve this answer
    
@Nadeem.. need to change any thing in the tag provided by you? When I copy paste the same thing the error is still showing. –  Mihir Sep 6 '12 at 13:26
    
@Mihir, you need to specify MasterPageFile attribute instead of DynamicMasterPageFile atrribute. Also, make sure you are specifying the proper path. –  Nadeem Yousuf Sep 6 '12 at 13:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.