Question

Hello and thanks for looking!

Background

I am building a commercial web application for a large client that requires us to use their existing SharePoint license since they have paid for it.

The SharePoint layer of this application (running on the webserver that also runs SP) is written in C# Asp.Net 2.0. Outside of that, we are writing an ASP.Net MVC 3 app in C# and Asp.net 4 and, although we would normally build a nice core library, web front-end, MSSQL backend with entities in the middle, etc, we are stuck with Sharepoint 2007 as a backend and ultimately a CMS.

So--we are making SP the service layer. It's only job is to respond to requests for data with JSON objects, then our MVC3 app takes it from there by building entities from the JSON, using modern LINQ, Lambdas, etc.

The Problem

We find ourselves having to structure the data tables (which will live in SharePoint as SharePoint Lists) to conform to the way in which the end-users will manage the content. So, in essence, this necessitates a larger-than-normal amount of columns in each table to hold data that would normally be relational based. Yes--I know all about look-up lists, thanks.

In the modern world, we would draw on multiple data tables, build an entity/model, and then render a form from that entity which the end-user could use to update the various data.

In the SharePoint world, the unfortunate tendency is to build an enormous table so that a form drawn from it will mimic a well-planned entity.

I suppose that the answer lies in using SharePoint Designer 2007 to creat custom forms that pull from multiple tables and allow for a little logic and flexibility, but I do not care to use this tool (which I must do via RDC) for form creation. I would much rather automate the creation of these forms based on the entity that I construct in a development tool I am building. So. . .

My Question

Given that I already have robust code-generation technologies, which includes the creation of SharePoint lists and such via C# code, is there a way (through C#) to create SharePoint custom forms without going through SharePoint Designer?

In other words, I have already written code that allows me to create the data tables (SharePoint Lists) the way they would be in SQL, then generate the data entity model and corresponding code for issuing a JSON response. Now I just need to automate the process of building a custom SharePoint Form that ties my model, which is based on multiple SharePoint Lists, to that same work flow. I can accomplish this through SharePoint Designer, but how do I do it in C#?

Many Thanks!

Matt

Was it helpful?

Solution

For custom list forms you have an option of developing - Custom Rendering Templates. These are ascx files and hence if you have standardized layouts etc, you may very well be able to automate the code generation to some extent.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top