SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I createad an application page and put it under /_layouts/, in the list definition I specified the edit form like so:

<FormUrls xmlns="">

This updated the edit form to my application page when I had set Deployment Conflict Resolution: Auto on my list which deleted the list and recreated it.

I now have data in the same list in a different farm and I have to set Deployment Conflict Resolution to None. When I deployed this to the other farm the list kept is default edit form and I figured I have to change the form pro grammatically.

I created a feature with a feature receiver and added some code:

public override void FeatureActivated(SPFeatureReceiverProperties properties)
    SPSite site = (SPSite)properties.Feature.Parent;
    var rootWeb = site.RootWeb;
    var myList = Utility.GetRootListByName("myList");
    myList.DefaultEditFormUrl = "/_layouts/myform.aspx";

However with this code I get Activate Features': Unable to find an SPForm matching URL /_layouts/myform.aspx

Should I be able to use an application page as edit form? I mean it works fine when I deploy the list definition for the first time.

Thanks in advance.

share|improve this question

Your Answer


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.