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

I have developed a custom ASPX SharePoint application page using Visual Studio. I would like to use that page as the EditForm and DisplayForm for the custom content type.

At the moment, my page is receiving some values as HTML page parameters through page URL extensions. If my page becomes EditForm and DisplayForm, how do I pass those parameters to it? Parameters are list guid, list title and item id.

Lastly, my custom ASPX page contains a related code-behind file. If it becomes EditForm and DisplayForm, what happens to the code behind?

Any help on this would be greatly appreciated. I am looking for some resources on the net, preferably with some code examples. Thanks!

share|improve this question

2 Answers 2

up vote 1 down vote accepted

This link might be useful for you - http://blog.qumsieh.ca/2009/05/15/how-to-change-the-default-editform-newform-and-dispform/

Linked new/edit/display page should be an application page. Parameters such as ItemId and list guid are passed by default in query string automatically by SharePoint. You can then read them and having list guid you can retrieve list title programmaticaly by fetching SPList object for given guid.

share|improve this answer
    
Thanks, the URL is quite useful. –  Boris Jun 5 '12 at 15:47

you have several possibilities for this. First of all if you use SharePoint Designer you can easily create custom list forms for a content type. This is described in the following link. http://office.microsoft.com/en-us/sharepoint-designer-help/create-a-custom-list-form-HA010119111.aspx

This customization creates a "normal" list form. This forms can also be replaced by a custom web part or InfoPath form.

If you take a closer look on the SPContentType object you will find certain properties that can be set to any url.

  • DisplayFormUrl - Point to the url to display a list item.
  • EditFormUrl - Point to the url to edit a list item
  • NewFormUrl - Point to the url when a new file will be created.
share|improve this answer

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.