locked
Sharepoint Desginer with C# Server side Code Behind and Publish on Sharepoint Server RRS feed

  • Question

  • Hi Team,

    Can anyone tell me how can i do the coding (like C# server side code) for those pages which are added from the Sharepoint Designer ?
    Suppose, I have added page through sharepoint designer, now i want to do the code behind work. so, where i do that and secondly how it will publish/ work at sharepoint server ?

     


    Thanks & Regards, Brijesh Shah
    Wednesday, June 1, 2011 12:31 PM

Answers

  • That's a very complex request.  There are lots of introductory topics available on the Internet about how to get started programming with Visual Studio and SharePoint.  But nothing remotely close to what you are trying to do.  A good place to start for SharePoint 2010 would be the Developer's resource center.  YOu'll find lots of videos and other information there.

    http://msdn.microsoft.com/en-us/sharepoint/default


    Paul Stork SharePoint Server MVP
    • Marked as answer by David HM Thursday, June 9, 2011 1:36 AM
    Saturday, June 4, 2011 4:59 PM

All replies

  • Code behind pages are compiled into DLLs and can only be created by Visual Studio or some other compiler.  What you want is inline server side code added to a page through SharePoint Designer.  By default that capability is turned off in SharePoint because it would be too easy for a hacker to insert server code into a page and have the code run on the server.  The setting that controls this is the PageParserPath setting in the web.config of the site.  You can read more about how to override it here, but I wouldn't recommend it as a general practice.

    http://msdn.microsoft.com/en-us/library/bb862025%28v=office.12%29.aspx


    Paul Stork SharePoint Server MVP
    Wednesday, June 1, 2011 12:47 PM
  • There is alternate of using User Control as webpart in your SPD pages.

    Smart Part http://smartpart.codeplex.com/ is a solution to deploy your user control as webpart in Sharepoint page.


    Dare to promise
    Wednesday, June 1, 2011 2:01 PM
  • Hi D-Virdi & Paul,

    You're right. But I want the functionality of Sharepoint List and the same way i want to do my custom .net coding.

    I mean i want all features of Sharepoint List (Specially Export to Shreadsheet, Sorting, etc..) and same time i want to add my custom .Net Coding with that list.

    Is there any feature in Sharepoint designer or .Net where i can create my own list and use sharepoint list top panel for them ?


    Thanks & Regards, Brijesh Shah
    Saturday, June 4, 2011 9:18 AM
  • Yes you can create your own list and add custom code.  But to do that you will need Visual Studio.  If you are using SharePoint 2007 then Get VS 2008 and the add in called Visual Studio Extensions for WSS (VSEWss).  If you are using SharePoint 2010 then you need Visual Studio 2010.  You can't create custom code using SharePoint Designer.
    Paul Stork SharePoint Server MVP
    Saturday, June 4, 2011 11:29 AM
  • Hi Paul,

    Can you give me some sort of link from where i can get a reference/ video/ webcast/ tutorial for the same ?

    Actually i have sp2007 & sp2010 both at office. but now, i have a question how can i achieve my goal of custom list with sharepoint default operation set of "Export to spreadsheet" & "sorting" etc...

    I have tried to create one custom list through sharepoint designer by creating one new aspx page but then i limited my code till to add two list combindly but then after not success to add operation panel (those "export to spreadsheet" & "sorting") in that page.


    Thanks & Regards, Brijesh Shah
    Saturday, June 4, 2011 11:59 AM
  • That's a very complex request.  There are lots of introductory topics available on the Internet about how to get started programming with Visual Studio and SharePoint.  But nothing remotely close to what you are trying to do.  A good place to start for SharePoint 2010 would be the Developer's resource center.  YOu'll find lots of videos and other information there.

    http://msdn.microsoft.com/en-us/sharepoint/default


    Paul Stork SharePoint Server MVP
    • Marked as answer by David HM Thursday, June 9, 2011 1:36 AM
    Saturday, June 4, 2011 4:59 PM