0

I want to use my application page as custom NewForm.aspx for the list. So I configured list's Schema.xml to use new Form:

<Form Type="NewForm" Url="NewRequestPage.aspx" Path="NewRequestPage.aspx" WebPartZoneID="Main" />

Then I added application page into my list definition subfolder in the following way: my application page properties

The issue consist in error that occurs when item creation page is called:

File /mhp-clean-evr/Lists/VisitRequestsList/masterurl/default.master does not exist

Currently MasterPageFile attribute value is "~masterurl/default.master".

What MasterPageFile attribute value to use to make my custom new form work?

Unfortunately I couldn't find an answer for this question yet.

  • Solution: Manually configure MasterPageFile property via changing it from PreInit event: ` protected void Page_PreInit(object sender, EventArgs e) { // Override master page this.MasterPageFile = "../../_catalogs/masterpage/seattle.master"; }` – Yura Mocherniuk Sep 26 '16 at 11:30
0

Try MasterPageFile attribute as

MasterPageFile="/_catalogs/masterpage/default.master"
| improve this answer | |
  • In this case I receive error: The resource cannot be found. HTTP 404. Requested URL: /mhp-clean-evr/Lists/VisitRequestsList/NewRequestPage.aspx I think this is quite strange because location of the page wasn't changed. – Yura Mocherniuk Sep 26 '16 at 6:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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