sharepoint

Execute Javascript only on page load, not PostBack (SharePoint)

故事扮演 提交于 2019-12-23 17:58:55
问题 I'm trying to execute some JavaScript on page load on a custom page on a SharePoint site (it populates the people picker with the current user). The problem is that the code executes on postback too, which I don't want as it will reset any changes to the people picker. I've tried using if(!IsPostBack) to no avail. Everything errors out at that point, giving SCRIPT5009: 'IsPostBack' is undefined. I can't find anything online to help with this. Any ideas? Thanks 回答1: You can create a function

Using SPSite from 32bit application to access 64bit SharePoint

纵然是瞬间 提交于 2019-12-23 17:53:00
问题 I've created a batch job that running in 32bit mode as it using 32bit COM objectes, this need to connect to SharePoint to make updates to list. It works in my development environment as it is full 32bit. But in my test and prodution environment we use 64bit SharePoint and this is what I get from SPSite: System.IO.FileNotFoundException: The Web application at http://<my sp host>/ could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content,

How to sync e-mail outlook2010 and sharepoint2010

你离开我真会死。 提交于 2019-12-23 16:23:35
问题 I need to sync emails between outlook2010 and sharepoint 2010. I have been searching, but found syncing contacts, calendars and tasks. Links and examples will be appreciated. Question: What is the best way to achieve this? 回答1: Take a look at the Sharepoint webpart OWAInboxPart which will display email from Exchange without having to store the emails within Sharepoint. 回答2: The question is Why? Outlook is a communication tool not a storage facility. There is an outlook web parts in SharePoint

Accessing Sharepoint Web Services without authentication

杀马特。学长 韩版系。学妹 提交于 2019-12-23 16:18:22
问题 Is it possible to access a sharepoint web service without authenication? If you can't do it directley can you think of any ways to get round it such as haveing an open service inbetween that does authenicate for you using a public account. 回答1: John, The security model of the web application through which you're trying to access the web service in question is going to drive whether or not you can access the service anonymously. If you're attempting to access the web service through a web

Highcharts don't render in Internet Explorer 11

你说的曾经没有我的故事 提交于 2019-12-23 16:10:59
问题 I am making a dashboard in a Sharepoint html page. My charts render and display correctly in Chrome, but only the pie chart renders in Internet Explorer 11. If I create a static array of data for the series, it works. If I try to populate it dynamically, it only works in the pie chart. <script type="text/javascript"> $(document).ready(function() { Date.dateDiff = function(datepart, fromdate, todate) { datepart = datepart.toLowerCase(); var diff = todate - fromdate; var divideBy = { w:

How to detect the item restore on a ItemAdded() event on SharePoint

霸气de小男生 提交于 2019-12-23 16:00:28
问题 I know that when an item is restored from the recycle bin, the ItemAdded event is fired. However, how can I detect if the item added comes from the recycle bin or if it is a new file. 回答1: This is a very old thread, but it comes up in the top results for searches on the topic. From my experiments with SP2010, it looks like properties.AfterProperties is empty when the item is coming from the Recycle Bin, whereas it is fully populated on an actual new item. So, a simple block such as this would

how to save spfile in physical location in c#

二次信任 提交于 2019-12-23 15:53:48
问题 i need to save the spfile in physical location. for ex: c drive. i get the file using the code below: using (SPSite site = new SPSite(item.Web.Site.ID)) { using (SPWeb web = site.OpenWeb(item.Web.ServerRelativeUrl)) { SPFile file = web.GetFile(item.File.UniqueId); } } now how to save file in physical location. please give some code. 回答1: Use SPFile.OpenBinaryStream() to "open" the file: SPFile file = ...; using (Stream stream = file.OpenBinaryStream()) { using (FileStream fs = File.OpenWrite(

where is microsoft.visualbasic.dll for .net 3.5?

时间秒杀一切 提交于 2019-12-23 15:51:10
问题 I am building a Sharepoint webpart, and I need to use the .net 3.5 microsoft.visualbasic.dll reference because Sharepoint uses .net 3.5. Where can I find it? I tried looking here, but can't find it C:\Windows\Microsoft.NET\Framework\v3.5 I tried the .net 4.0 dll but the project didn't let me import it. 回答1: It is not a v3.5 specific assembly, it is part of the core .NET assemblies. So you'll find it in c:\windows\microsoft.net\framework\v2.0.50727 , along with the other core assemblies like

Get all the users based on a specific permission using CSOM in SharePoint 2013

99封情书 提交于 2019-12-23 14:21:57
问题 I want to get the list of all the users who have a particular role/permission on a site. For example, I need the list of users who have edit rights (RoleType=Editor) using .Net CSOM in SharePoint 2013. They can be in any group. I tried many things. However, it seems there isn't a straight forward way to do this. Any ideas? Thanks in adavance. 回答1: You could utilize Web.GetUserEffectivePermissions method to gets the effective permissions that the specified user has within the web site. Example

Get all the users based on a specific permission using CSOM in SharePoint 2013

ぃ、小莉子 提交于 2019-12-23 14:21:14
问题 I want to get the list of all the users who have a particular role/permission on a site. For example, I need the list of users who have edit rights (RoleType=Editor) using .Net CSOM in SharePoint 2013. They can be in any group. I tried many things. However, it seems there isn't a straight forward way to do this. Any ideas? Thanks in adavance. 回答1: You could utilize Web.GetUserEffectivePermissions method to gets the effective permissions that the specified user has within the web site. Example