views:

272

answers:

4

I am createing an external facing SharePoint site which contains a number of custom lists. Some of these are extremely complicated.

I generally avoid using the SharePoint Designer like the plague, preferring to stick to Visual Studio.

To display a list item to users should I really try and get my head around making a custom DispForm.aspx or would is it better to create my own custom asp.net page, pass the item id into it and populate the page using code behind?

If I go the second option is there a way to 'bind' the list item to the page so I can directly access the fields or would I have to do literal replacement etc?

Thanks

A: 

Best thing to do is, customize the form in SP Designer and use a feature to deploy the modified list pages.

You can do this by modifying the list schema.xml and specifiying your custom list pages at the bottom.

Lee Dale
A: 

Its depends on what Kind of customization you wanted in the Display form.

  1. Are you trying to get the Custom Look and Feel for the Display Form ? (Try setting the System Master page to your Branded Master page)
  2. Are you trying to get the Fields arranged in a different fashion unlike Two column listing? ( You need to create a Custom ListItemIterator & Rendering Template) Refer this for more information. Once you have the ListIterator then you need to write a custom List Template and in the end of Schema.xml you need to set the Template to your custom Template.

    <Forms>
        <Form Type="DisplayForm" Url="DispForm.aspx" Template="CustomListForm" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
    

  3. And to answer the second Question on how to bind. You can Try out SPDataSource and this.This will allow you get the details for the Single Item.Specify the mode to ListItem

Kusek
A: 

I ended up creating a completely seperate ASP.Net page that just referenced the List and displayed items as needed with query parameters etc

This worked well

Mark
A: 

Can you help me in knowing the code?? I am new to .net and sharepoint technology... Thanks in advance!

parul