Post Data To SharePoint Page

Hello Everyone ,

I am new to this forum and also to share point. I have an .net application and and i am asked to create a page and its contents to the share point server from my ,net code.I have no idea about this and looking for any support to understand this


Can i write .net code to do the same. Please help.

Regards,

Pramod-(PJ)

September 4th, 2015 1:57am

Hi

you can insert date directly to masterpage - using javascript. This way the date will be present for all pages

This is a similar post

https://social.msdn.microsoft.com/Forums/sharepoint/en-US/9bcce9c5-8de0-4a63-b370-bb55336b9f87/how-to-insert-current-date-e-current-time-in-a-sharepoint-master-page?forum=sharepointcustomizationlegacy

Free Windows Admin Tool Kit Click here and download it now
September 4th, 2015 3:25am

Hi

you can insert date directly to masterpage - using javascript. This way the date will be present for all pages

This is a similar post

https://social.msdn.microsoft.com/Forums/sharepoint/en-US/9bcce9c5-8de0-4a63-b370-bb55336b9f87/how-to-insert-current-date-e-current-time-in-a-sharepoint-master-page?forum=sharepointcustomizationlegacy

September 4th, 2015 3:37am

You can write .NET code to SharePoint. You can create a visual studio project:

1. Create empty project and add a page(application or site page) to your project. You can copy your markup to a page and add your code to page behind file. compile and deploy yoyr solution.

2. Create visual web part and add your mark up files to .ASCX page and code(if any)  to ...ASCX.CS file.

compile and deply your application.

Free Windows Admin Tool Kit Click here and download it now
September 4th, 2015 3:21pm

Hi Pramod,

Following are the two scenario:

1 Is your .Net application running on same server where SharePoint is installed. If yes then you can use SharePoint server object model. Store the address of your web application is web.config and insert the data into SharePoint. Put a button on your page and on click use the below code. Add the reference to Microsoft.Sharepoint.dll in your application.

SPSite myWebApp = new SPSite("your web application url");
SPWeb mySite = myWebApp.OpenWeb();
SPListItemCollection listItems = mySite.Lists[""Your List Name"].Items;

SPListItem item = listItems.Add();

item["Title"] = "Your Data";

item.Update();
}


2. If your application is installed on different server then you can user SharePoint Web Service to connect to Sharepoint and insert the data into sharepoint list. 

September 8th, 2015 2:42am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics