sharepoint-2010

SPContext.Current.FormContext.OnSaveHandler not firing when SPControlMode is New

坚强是说给别人听的谎言 提交于 2020-02-02 06:28:04
问题 I've got a web part that I'm using to add some custom controls to the New, Edit and Display forms for a SharePoint ListItem. I added a handler for SPContext.Current.FormContext.OnSaveHandler to update the item. I add my web part to the Edit and New forms using SharePoint Designer and hide (set IsVisible=False) for the DataFormWebPart that's put in by default. Everything works fine when editing an item. My OnSaveHandler function is called and I update the SPListItem. The problem is with a new

Authenticate network credential to access SharePoint site on client object model

痞子三分冷 提交于 2020-02-02 06:22:46
问题 I am working to small app, that is require to bring all users in all groups of given site. I have two sites; SharePoint 2010 running on premisses and SharePoint 2013 online. I am getting credential error... {"The remote server returned an error: (401) Unauthorized."} code. public class Program { static void Main(string[] args) { string _siteURL = "https://intranet.co.uk"; NetworkCredential _myCredentials = new NetworkCredential("user", "password", "https://intranet"); ClientContext

Authenticate network credential to access SharePoint site on client object model

点点圈 提交于 2020-02-02 06:22:34
问题 I am working to small app, that is require to bring all users in all groups of given site. I have two sites; SharePoint 2010 running on premisses and SharePoint 2013 online. I am getting credential error... {"The remote server returned an error: (401) Unauthorized."} code. public class Program { static void Main(string[] args) { string _siteURL = "https://intranet.co.uk"; NetworkCredential _myCredentials = new NetworkCredential("user", "password", "https://intranet"); ClientContext

Need inputs for logic for Codebehind in Infopath Button

主宰稳场 提交于 2020-01-25 19:20:13
问题 I have an infopath form,when i click on the button it should redirect to sharepoint list item's add item template.. in the code behined i gave try { string url = "Sharepoint List item's URL"; HttpContext.Current.Response.Redirect("url"); } catch { } But i am getting Security error like this System.Security.SecurityException Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. at Activity

Need inputs for logic for Codebehind in Infopath Button

荒凉一梦 提交于 2020-01-25 19:19:16
问题 I have an infopath form,when i click on the button it should redirect to sharepoint list item's add item template.. in the code behined i gave try { string url = "Sharepoint List item's URL"; HttpContext.Current.Response.Redirect("url"); } catch { } But i am getting Security error like this System.Security.SecurityException Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. at Activity

Add new accepted protocol to URL/link validation in SharePoint 2010

自作多情 提交于 2020-01-24 19:10:10
问题 I am trying to add a hyperlink in the content editor in sharepoint 2010. The problem is that the validation only allows certain accepted protocols (http, https, ftp, mailto, news, etc..). I need to add Lotus Notes link such as this: "notes://mydomain". I found a few pages that had some solutions for SharePoint 2007, but they did not work for me. Allowing alternate protocols to be entered in link fields how to insert notes:// link? My hope is that SP2010 addresses a way of getting around this

visual studio does not copy assembly into gac

折月煮酒 提交于 2020-01-24 16:06:49
问题 I have a class library and a sharepoint project. I have added a reference to the class library in the sharepoint project and when I click deploy I don't see the class library assembly in the gac. I think this is not normal. can any please let me know how can I solve this issue without resorting to manual deployment? thank you. 回答1: You have to open the package in the package editor, go to Advanced, and add the class library's DLL there. It doesn't happen automatically just from adding an

visual studio does not copy assembly into gac

和自甴很熟 提交于 2020-01-24 16:05:06
问题 I have a class library and a sharepoint project. I have added a reference to the class library in the sharepoint project and when I click deploy I don't see the class library assembly in the gac. I think this is not normal. can any please let me know how can I solve this issue without resorting to manual deployment? thank you. 回答1: You have to open the package in the package editor, go to Advanced, and add the class library's DLL there. It doesn't happen automatically just from adding an

Calculated SharePoint Column

不打扰是莪最后的温柔 提交于 2020-01-16 18:44:40
问题 I have a simple calculated column in my SharePoint 2010 list. It takes the list item ID, adds 100 to it. When my users are creating items in the list, the calculated column does not get updated unless I go in, edit the column (do nothing) and save it. It, in fact, gives all items a value of 101 unless I manually edit the column. Is this typical or is there a work around for this issue? Thank you! 回答1: It is not possible to create calculated column based on ID value. The Id of the item is

ASP.NET Web Form on SharePoint

倖福魔咒の 提交于 2020-01-16 11:12:10
问题 Heh guys, I would like to create and deploy an ASP.NET web form on SharePoint server which can create document in SharePoint list (or library). Since I'm not experienced in both these technologies so would appreciate if someone guides me to the right tool. Should I use Visual Studio or SharePoint designer ? Also, I was reading an article on MSDN about "Deploying ASP.NET Web Applications in the Windows SharePoint Services 3.0 _layouts Folder". Is it the best practise or should I go with