0

I want to replace a DispForm.aspx of a list (SharePoint 2010) - so I did the following:

        string path = string.Format("Lists/{0}/DispForm.aspx", "MyList");
        SPFile file = web.GetFile(path);
        file.SaveBinary(File.ReadAllBytes(@"C:\DispForm_ProcessList.aspx"));

Unfortunately, now is the DispForm.aspx of the list is no longer associated with it. (I can find the DispForm.aspx file using the sharepoint designer below "all items\lists\MyList")

1 Answer 1

0

As you are able to see the DispForm.aspx in SharePoint Designer, you can set it as the Default form.

In SharePoint 2010 Designer: To do this, in the Form section click on the DispForm.aspx And click on Set as Default option in the Ribbon control.

Hope this helps.

4
  • The DispForm.aspx is not available in the Form section :-(
    – AHO
    Commented Nov 5, 2013 at 8:19
  • What all entries are present in the Form section?
    – kamleshrao
    Commented Nov 6, 2013 at 6:39
  • Only EditForm.aspx and NewForm.aspx
    – AHO
    Commented Nov 6, 2013 at 8:58
  • Did you ever get around this? I'm on the verge of starting over entirely.
    – Jason Bray
    Commented Apr 4, 2016 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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