.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Create buttons for "new item" which create a new page of a specific content type

Posted By:      Posted Date: September 01, 2010    Points: 0   Category :SharePoint
We have a Pages library (wiki) which supports a few content types (and page layout associated). We want to enable users to click a button for example of "new custom enterprise wiki page" - so a new page of content type article will be open in edit mode. Can someone help how to develop? (it has to mimic the behavior that happens when user creates new page from the Ribbon or Site actions and has to choose the content type, it also has to keep the new page in edit mode and not just create it).  

View Complete Post

More Related Resource Links

Add new item link to create a no-default content type item


I have a contacts list in which there is a company and person content type. The default content type is person, given they will be the most commonly created item. However, I want to create a link on a different page that links to create a company. The link created correctly launches the company contact form, but for some reason creates the contact as a person contact (i.e. the default) instead of a company content type.

My link is: https://MyServer/MySite/Lists/MyList/NewCompanyContact.aspx?List=0b73f0cb%2Deb48%2D4a25%2Da817%2Dc89f930e19a5&RootFolder=%2FBusinessDevelopment%2FLists%2FContacts&ContentTypeId=0x01007B29F47C6BF470468E8EA02DD8570DFF001DA7CBDD0D967F498114C805487BEA38&IsDlg=1 

Am I missing something?

Cheers, Theo

Create Content Type in State Machine Workflow

Hi, I created a state machine workflow in share point 2007 with default associated task list. This is working fine. Now I want to add a custom content type to task in which I want to show 3 fields on task form : Title, Description, status And also I want to set some default values in these fields. How can I create and add this custom content type in state machine workflow ? G. Goyal

Create a list definition without a Custom Content Type

is it possible to create a list definition without creating a custom content type?  I want to create a list definition and select "Custom List" and then I just want to add fields to the custom list and not create a content type that will show up in the SharePoint GUI.  Seems like to get the new fields to show up in the new and edit forms I have to add the fields to a custom content type.

Create a Page Layout for Enterprise Wiki with content

I need to create a Page Layout that for an Enterprise Wiki Page that already has content in the Rich Text HTML Field so when people go in to create a new page based off of the Page Layout they can go in and just replace the text with their own. Can this be done?

How to create a Table of content in .rdl design in BIDS dynamically according to the Page no wise..?



well i am able to create the TOC statically by using the Document Map properties as describe in my older post issue 

but now i just want to create the Table of contents dynamically generate using the page no wise..is it possible...how can we do it while designing the .rdl in BIDS..



Create View in an External List that Gets a Field from Another External Content Type via Foreign Key


I currently have two tables in a SQL Server 2k8 database: Locations and Customers

The fields in the Locations table are:

  • LocationName
  • StreetAddress
  • City
  • State
  • ZIP
  • CusotmerID (foreign key joined to Customers table)

The fields in the Customers table are:

  • ID (primary key)
  • CustomerName
  • CurrentBalance

Through SharePoint Designer, I have both tables set up as External Content Types of the same names as the tables and have created External Lists for each External Content Type. All CRUD operations are working perfectly. I added the proper Assocaiation and I've set CustomerName to be the Title of the Customers External Content Type. I can currently use a picker for CustomerID in the Locations List and CustomerName is displayed properly. Also, the default DispForm also correctly displays the CustomerName for any single Location record.

However, I would like to modify the default ReadList so the foreign key (CustomerID) will show the Title field of Customers (CustomerName). However, I am running into trouble finding out how to do this.

Any help with this issue would be greatly appreciated!!


how to create a custom task content type for VS2008 workflow



i want to create a WorkFlow by VS2008 and i want to use custom content type for the tasks, and i want to build this cutome content type by Aspx form but i don't know how, any ideas ??


Thanks for all.

How to create a custom content type with own custom view ,add, edit and delete form in sharepoint fo


How to create a custom content type with own custom view ,add, edit and delete form in sharepoint foundation server 2010 using visual studio 2010?

I donot want to use default form "form.aspx".

we can use my custom form in place of "form.aspx"?

Programmatically create publishing page and fill with content.


I have a bunch of HTML which has been exported from a different platform.
This HTML could be located in a database or contained within an HTML file. 

I am looking for some guidance on the best way to programmatically create a publishing page in SharePoint at a specific site location, then populating the RichHtmlField Publishing Web Control (PublishingPageContent) with the HTML that has been exported from one of the sources mentioned above.

Any suggestions/advice you can offer will be much appreciated.


Want to create a content type with its own Newform.aspx,editform.aspx,allitems.aspx by means of wiza



The wizard then creates a solution on visual studio. The code behind will write generic code for updating/adding into sharepoint.i is there a wizard which will create content type with individual aspx ? If there is a wizard utility which prompts you for fields and field types and then it will create code behind for the aspx.
With this done I can go at the code behind and ammend to put more logic. 


error with "Create new content" type Translation Management Library


I added the Translation Management feature today, using the following command line:

stsadm -o activatefeature -name TransMgmtlib -url http://mysite

everything seemed to work fine, as no error occurred at this stage, and when I go to my top level site settings, click on "Site libraries and lists", then "create new content" I now see "Translation Management" as an option.

I select this type, click Create, complete the first part of the 'wizard' (Name and Description, etc.), then I'm on step 2 and this is where the error occurs. 

  1. The Workflow select box is disabled, and from the articles I've read this should be usable.
  2. More critically, when I complete this form and click Next, I get a server error:

    Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. 

I've googled around, and tried updating various items in my web.config and machine.config, but I cannot find the solution. A lot o

"Duplicate content type name" error when trying to create a site from a custom site template


I am getting "A duplication content type name 'Approval' was found" error, when I try to create a new site based on a custom template.  These are the steps that result in the error:

  1. Create a new blank site.
  2. Without making any changes, save the blank site as a site template called "test".
  3. Try to create a new site based on the "test" template.
  4. Get the above error.

I did notice that when I tried creating site from the template in a different area of my site collection, the error name changed from "Approval" to "Requestor". 

As it stands I cannot use custom templates in my site collection.  Any advice on how to overcome this error?


when i tried to create new external content type in sharepoint designer in ribbon it show error like

when i tried to create new external content type in sharepoint designer in ribbon it show error like  "  The server was unable to process the request due to an internal error, for more information about the error, either turn on includeexceptiondetailsinfaults (tither from servcebehaviorattribute or from the <servicedebug> configuration behavior) on the server in order to send the exception infromation back to the client, or turn on tracing as per the microsoft .net framework 3.0 sdk documentation and inspect the server trace losgs.  "

Simple Steps to Create Content Type in SharePoint 2013

A Simple way of explaining what is SharePoint Content Type is by imagining us grouping Columns used in your list or library together, which we plan to reuse often.

Create web site specific to mobile device, how to detect?



I have a website that is written in .Net 2.0 which uses all the nice rich functionality of the web (Ajax, javascript etc..).  However I have noticed that the site does not display very well on mobile devices. 

So therefore I would like to create a more streamlined version of my site that is better tailored to these devices.  However how do detect that the user has come to the site via a mobile device and how can i redirect them to my tailored page

Many thanks in advance

Want to create Page URL rewrite based on Users GUID and Display name?



I am using the asp.net membership. 

On my site I have a Profile.aspx page.

In the code behind of this page,  i get the logged in UserId (Guid) and pass

this to a method in my DAL. GetUserByUserId()


In my database I have a Table called Member which the method gets the data from

and displays details on the page about  the user.


What I want to happen is when they have logged in and are diverted to Profile.aspx,

the page URL shows www.MyWebSite/Profile/UsersName 

for example



is this possible. In my Member table I have FirstName and LastName columns or do I get the

name from the membership table.


even better would be they go straight to www.MyWebsite/JohnSmith.aspx


thank you for any help






I want to create registration page and login page


I have design form layouts for signup and login pages 

Please provide me the step by step code for sign up and login pages using c# with validation.

waiting for urgent reply

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend