moss

Creating custom URL tokens in ASP.NET (a la MOSS)

北城余情 提交于 2019-12-09 23:32:01
问题 In ASP.NET, the tilde (~) is treated as a token in URLs and treats paths prefixed with that as relative to the application root. This is well-known functionality. In MOSS, there are other tokens, such as ~sitecollection/mypath... which behaves in a similar way, but treats the path as relative to the site collection root. How is this accomplished? After a cursory search I could not find any info on how to add tokens like this to the .NET URL resolution mechanism. 回答1: It may not be the only

Customizing breadcrumb in sharepoint publishing site with variations

牧云@^-^@ 提交于 2019-12-09 18:34:01
问题 I have a Sharepoint publishing site with variations. The breadcrumb by default shows this: Variation Root > English Site > Some Page What I want to display is: "Home" > Some Page, where Home points to the English site root. Is there a way to achieve this withouth creating a custom server control to do that? 回答1: If you know the exact number of levels you can use a SiteMapPath like: <asp:SiteMapPath runat="server" ParentLevelsDisplayed="1" /> Otherwise the SiteMapPath always goes direcly

SharePoint 2007: How can I perform a series of operations within a transaction?

冷暖自知 提交于 2019-12-09 18:08:21
问题 I would love to know how to perform a series of operations in a SharePoint context within a transaction. For example, I would like to be able to do something like the following: context.BeginTransaction(); listItemA.Update(); listItemB.Update(); context.CommitTransaction(); I know this isn't possible with the OOTB APIs, but someone has got to have figured out how to accomplish this. Is it possible to get a reference to the database connection in order to handle the transaction? Or any other

Debugging SharePoint 2007 Code

空扰寡人 提交于 2019-12-09 06:27:33
问题 How do you debug your SharePoint 2007 code? Since SharePoint runs on a remote server, and I'm developing on a windows xp machine (with the necessary .dll files copied into my GAC), I haven't had much luck with finding easy ways to debug. Breakpoints don't work, etc. The best way I've come up with is to enable page tracing in the web.config file, write trace messages throughout my code, and access trace.axd whenever I need to debug. Does anyone have any better suggestions for debugging? Am I

Sharepoint List to PDF report

倖福魔咒の 提交于 2019-12-08 22:11:24
问题 I have a SharePoint list and I need to transform it into a document (any type) and export it to PDF. Would you have any tips on the best way to do this? I have Crystal Reports but not sure if this is the correct use case for this. 回答1: You can programatically access the document library using the object model or via web services. If you use the object model. You can use the SPContext object to get the current site/list. From there, you can iterate through the items or, you can use a method on

SharePoint DateTime default value respect timezone

删除回忆录丶 提交于 2019-12-08 06:52:41
问题 I have a DateTime field (Date Only) that uses the "Today's Date" as a default value. However, when a user adds an item to the list the date that is selected is respective to the GMT timezone. Therfore if a user adds an item on 2/22/2012 at 7pm (EST) the default value will actually read 2/23/2012. My first thought was to check the web application settings, and they were set to -5 EST. Then after some searching I found that time zones can differ based on a users regional settings. Testing this

How can I integrate Laconica update stream into SharePoint?

六眼飞鱼酱① 提交于 2019-12-07 11:45:13
问题 I have Laconica (self hosted twitter) configured on my local intranet and would like to integrate the public stream into SharePoint site with a web part. How can I do this? 回答1: You can point an RSS Viewer web part at the laconi.ca public stream RSS feed and use this XSLT to ensure attractive output. Result screen shot: Screenshot of Laconica update stream in SharePoint Team Site http://friendfeed.s3.amazonaws.com/9e1759e689923f47ed4aa8721c9e104980db4b1c XSL transform: <xsl:stylesheet xmlns:x

Get Directory Path to 12 Hive programmatically

北慕城南 提交于 2019-12-07 07:22:41
问题 Is there any way to get the directory path of the 12 Hive programmatically? I am creating a feature which delivers a file to the XML directory in the 12 hive, and I don't want to hardcode the directory path in my code. Is there any Object Model property which exposes the 12 Hive directory path string as a property? 回答1: You can use the Microsoft.SharePoint.Utilities.SPUtility.GetGenericSetupPath() method. See for more information the WSS SDK: http://msdn.microsoft.com/en-us/library/microsoft

Determine which edition of SharePoint is Installed?

别来无恙 提交于 2019-12-07 04:26:41
问题 What is the most reliable way to determine which version of SharePoint is installed. Whether it is WSS or MOSS. If MOSS, whether it is standard or enterprise. I want to programmatically detect the exact SharePoint version installed.. PS: I already have posted this question at SharePoint.SE but could not find a convincing answer. 回答1: You could try to use SPFarm.Local.BuildVersion or SPWebService.ContentService.Farm.BuildVersion (from this previous question) and to build a lookup table based

Dynamically display Edit Control Block menu item in SharePoint

大城市里の小女人 提交于 2019-12-07 04:07:05
问题 I am trying to set up dynamic per-item menus (Edit Control Block) in SharePoint 2007. My goal is to have certain features that are available based on the current user's group membership. I know that the CustomAction tag that controls the creation of this menu item has a Rights attribute. The problem that I have with this is that the groups I am using have identical rights in the site (ViewListItems, ManageAlerts, etc). The groups that we have set up deal more with function, such as Manager,