zoukankan      html  css  js  c++  java
  • asp.net in sharepoint

    http://www.cnblogs.com/Sunmoonfire/archive/2008/04/10/1146975.html

    Sharepoint How To Add ASP.NET Page To _layouts or site

    http://blogs.msdn.com/besidethepoint/archive/2010/05/01/how-sharepoint-integrates-with-the-asp-net-infrastructure.aspx

    HTTPModule and HTTPHandler.

    http://msdn.microsoft.com/en-us/library/cc297200.aspx

    MasterPageFile=”~/_layouts/application.master”

    http://asp.net-tutorials.com/basics/events/

    http://odetocode.com/Articles/406.aspx

    http://weblogs.asp.net/soever/archive/2006/11/09/SharePoint-2007-_2D00_-_2F005F00_layouts-and-how-to-create-pages-that-run-in-site-context.aspx

    Create a web application project that can be deployed to theSharePoint /_layouts virtual directory, so my code is executed in thecontext of a site.

    The solution happens to be really easy:

    Create a web application project, either directly in the /_layoutsfolder or somewhere else and copy over all files needed to run yourapplication.

    The *.dll and *.pdb files produced as build output must be places inthe bin folder of your SharePoint web site. In my test situation thisis the folderC:\Inetpub\wwwroot\wss\VirtualDirectories\3a938f6a-15f2-49ae-be78-328ad78974f5\bin.You can find this folder in your Internet Information Server Manager asfollows:

    •Right-click of the SharePoint web site
    •Select properties
    •Go to the Home Directory tab
    The value in Local Path specifies the path to the virtual directory, and in this virtual directory you find a folder bin.

    http://sharenotes.wordpress.com/2008/02/21/add-custom-aspx-pages-or-asp-net-pages-in-sharepoint/

    Solutions:

    1.The SharePoint designer approach: This approach can be used if there are few aspx pages with little functionality.
    2.Using web parts. This can be used in conjunction with SharePointdesigner. But once again, developing many web parts is not feasible andalso raises performance issues.
    3._Layouts folder approach: This is the simplest of all. Just deploythe web application pages under the _layouts folder of SharePoint andthe pages can be accessed from any SharePoint site. Cons: The pagesdon’t inherit the security and access rules from SharePoint. The pagescan be accessed from any site existing on that server farm. Master Pageintegration is not possible. MSDN Article explains with a sample.
    4.User controls using Smart Part: In this approach, the developer candevelop web parts using the third party Smart Part control. In this waythe developer can have the drag – drop functionality as he/she candevelop it as a user control and drop it in the smart part. This methodis similar to web parts but the developer has the privilege ofdrag-drop functionality but it still carries the negatives mentionedfor the web parts approach.
    5.Using features and WSP package: Following some steps as recommendedby Andrew Connell (MOSS MVP). Here is the blog. I believe this is thestandard approach users are using in the SharePoint developer community.
    6.Using VSeWSS (Visual Studio extensions for WSS): This is yet anotherand latest solution. Microsoft recently released the VSeWSS 1.1 RTM.Using this, we can deploy all the asp .net pages into SharePoint bysetting up a new project in Visual Studio. VSeWSS creates a solutionpackage using features. Setup the project and hit ‘Deploy’ and it isdone.

    http://www.andrewconnell.com/blog/articles

    /UsingCodeBehindFilesInSharePointSites.aspx

    In native ASP.NET 2.0 sites, adding new pages involves dropping anew ASPX file into the desired folder in the site. In SharePoint, whileit is possible to drop files within the webroot of the SharePoint site,it is not recommended. Rather, developers should create a template(just an ASP.NET 2.0 file) and then provision an instance of the fileinto the SharePoint site that points to the file on the file system. Inboth environments, the assembly containing the compiled code behindfile of the ASP.NET 2.0 page is deployed to either the site’s \BINdirectory or the server’s GAC.

    There are two main differences in creating custom ASPX pages for usein a SharePoint site vs. an ASP.NET 2.0 site is that the file youcreate (ASPX) is used as a template for the real file (instance) withinthe SharePoint site. After creating the ASPX page, an instance needs tobe provisioned into the SharePoint site. This is done using aSharePoint Feature.

    Next, create the ASPX page that will be added to the SharePoint siteand put it in the Feature folder: SharePointCodeBehindPage. With thefile created, add whatever is necessary to implement the page the wayyou want it. The one thing to point out is you should use one of thefour SharePoint master page tokens as the value in the MasterPageUrlattribute in the Page directive.

    With the ASPX page and code behind created, now the two need to belinked together. Recall how Visual Studio does it… it adds an Inheritsattribute to the Page directive in the ASPX automatically. So… we cando it manually! So what do we put in this attribute? The full name tothe type, or class, of our page object. This is also known as the5-part name. The five parts are: [full type name], [assembly name],[version], [culture], [public key token]. Everyone has different waysof getting this. One of the easiest is to build the project and thenopen the file using Lutz’s Reflector. This gives you the last fourparts of the name, also called the assembly full name. Note that thetype name needs to also include the namespace. For the code in Figure 3above, here’s what my Inherits attribute is (note: don’t include theline breaks in the Inherits attribute as shown in the image… they arepresent just for readability):

    http://aspalliance.com/936_Including_Your_Own_ASPNET_Pages_in_Your_SharePoint_Portal.2

    If you look at the inheritance hierarchy for WebPartPage, it isinherited from System.Web.UI.Page (the one that is inherited from forASP.NET pages).

    System.Object

    System.Web.UI.Control

    System.Web.UI.TemplateControl

    System.Web.UI.Page

    Microsoft.SharePoint.WebPartPages.WebPartPage

    --------------------------------------------------------------------

    Microsoft.SharePoint.dll path
    MOSS 2007

    C:\Program Files\Common Files\Microsoft Shared\Web server extensions\12\ISAPI

    Custom code add to Moss 2007
    http://msdn.microsoft.com/en-us/library/cc297200(office.12).aspx

    Note: remove LINQ (using System.Linq;) namespace from your web application .cs file. MOSS will not support LINQ name space.

    http://weblogs.asp.net/soever/archive/2006/11/09/SharePoint-2007-_2D00_-_2F005F00_layouts-and-how-to-create-pages-that-run-in-site-context.aspx

    http://codegain.com/articles/sharepoint/developmentprogramming/developing-sharepoint-2007-in-Asp-Net-web-application.aspx

    http://vspug.com/roni/2007/08/18/moss-2007-creating-an-asp-net-application-in-the-layouts-directory-using-the-visual-studio-2005-plug-in-web-application-project/

    http://www.andrewconnell.com/blog/articles/UsingCodeBehindFilesInSharePointSites.aspx

    http://blog.mastykarz.nl/leveraging-asp-net-user-controls-sharepoint-development/

    Deploying New Master page

    http://sharepointmagazine.net/technical/development/deploying-the-master-page

    Customizing the Login Page in SharePoint 2007

    http://www.simple-talk.com/content/print.aspx?article=400

    MOSS 2007 Branding and Customization

    http://www.rdacorp.com/PDF/MOSS%202007%20Branding%20and%20Customization.pdf

  • 相关阅读:
    Linq to xml 示例分析
    Nhibernate学习笔记
    SQL – 11.练习
    集合 ArrayList
    分享一个不错的VS插件——CodeMap(转发)
    wamp配置虚拟主机,虚拟目录,伪静态
    RBAC (RoleBased Access Control)基于角色的访问控制
    PHP的面向对象
    一名靠谱的JavaScript程序员应备的素质
    Javascript 广告定位
  • 原文地址:https://www.cnblogs.com/icedog/p/1818169.html
Copyright © 2011-2022 走看看