I am creating a custom list inside a feature receiver. I would like to create a custom New Form for my list.

So, the list is not created via List definition.

Can anyone guide me how to create the custom form in visual studio and attach it to the newly created list and set it as the default form?

Thank you for your help.

1 Answer 1


You can define a custom applicationpage object in your solution which can have the custom form you want for the list. Your custom list definition can point to that file (or those files) as appropriate for the view, new, or edit forms.

Within the Schema.xml file the paths are defined within the Forms group.

  <Form Type="DisplayForm" Url="DispForm.aspx" 
        SetupPath="pages\form.aspx" WebPartZoneID="Main" />
  <Form Type="EditForm" Url="EditForm.aspx" 
        SetupPath="pages\form.aspx" WebPartZoneID="Main" />
  <Form Type="NewForm" Url="NewForm.aspx" 
        SetupPath="pages\form.aspx" WebPartZoneID="Main" />

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.