Tag Info

New answers tagged

0

Add a Search Results web part on the page. Click the "Change query" button (in the web part properties) and then select the "Recently changed items (System)" in the Select a query dropdown.


0

If you're dealing with a static URL, then you could define the subsite in your original code by changing the line using (SPWeb web = site.OpenWeb()) to something like this: using (SPWeb web = site.OpenWeb("http://siteURL/subsite")) Otherwise, when you call web.Lists.TryGetList("Testing"); later on, it's looking for the list in the root of the site ...


0

somthing on the lines of: public override void FeatureActivated(SPFeatureReceiverProperties properties) { SPSite site = properties.Feature.Parent as SPSite; using (SPWeb web = site.OpenWeb()) { //get the aspx file SPFile spfile =web.GetFile(web.Url + "/Pages/Engineering.aspx"); //we ...


1

You need to set the ListName property of ListViewWebPart. public override void FeatureActivated(SPFeatureReceiverProperties properties) { SPSite site = properties.Feature.Parent as SPSite; using (SPWeb web = site.OpenWeb()) { SPLimitedWebPartManager webparts = web.GetLimitedWebPartManager(web.Url + "/Pages/Engineering.aspx", ...


0

Because you're on SharePoint Foundation (thus you cannot use the $SPUrl expression), I would suggest that you resort to some classic ASP.Net tricks to workaround your issue: Add a runat="server" and id attributes to the link element <link id="css1" runat="server" rel="stylesheet" type="text/css" media="screen" href="" /> Within the Page_Load ...


0

Try the SPUrl token: <link rel="stylesheet" type="text/css" media="screen" href='<% $SPUrl:~site/MyDocumentLibrary/Css/example.css %>' /> If that doesn't work, try the full relative path to you managed path: <link rel="stylesheet" type="text/css" media="screen" href="corp/product/MyDocumentLibrary/Css/example.css" />


0

There is no way other than a webservice to achieve this if you want it through javascript. OOTB way is of course to use the Content by Query web part, which you state you have already tried. Though it does not show the location, you can still modify the ItemStyle.xsl to show the URL at least. If you want a more programmatic approach, you should look into ...


2

You can do it by yourself using standard JavaScript or jQuery. I show you an example how to recognize Web Part Zone Id. So if we have a page layout like this: Then we will have a page like this: That is how the DOM looks like: What I suppose is that the MSOZoneCell_ is a standard prefix then after that is the Zone Id. So you can use that on your ...


0

My fix involved a corrupted solution in VS2012. The Custom Tool property for the webpart's .ascx file was blank. When I entered SharePointWebPartCodeGenerator I received a lot of compile errors. That's when I realized I had two ...ascx.g.cs files. I deleted the file that did not appear under the web part file and got the solution to build. From there, ...


0

Another option: Click Site Actions|Edit Page. Click "Add a Web Part" on any Web Part Zone. From the Add Web Parts dialog, click "Advanced Web Part Gallery and Options". From the Add Web Parts panel on the right-hand side of the page, click "Closed Web Parts (some number higher than zero)". Select the first closed Web Part, and click "Add" to add it back ...


2

It appears that this has to do with IE9, IE10, IE11 document standards for the client's browser. The problem is in the pickerdialog.master. As the People Picker is using the pickerdialog.master file, you need to add the following line in the head element. meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" Find the pickerdialog.master file in ...


0

I am using PeoplePicker with HTML5and CSS3, this is my function to inizialie it and get the value: Use the function initializePeoplePicker to inizialize the picked. The argument is the DIV id. To get the value of the picker, use the fucntion getUserInfo(). function initializePeoplePicker(peoplePickerElementId) { Create a schema to store picker ...


0

use this javascript to hide it <script type="text/javascript"> var elem = document.getElementById("Ribbon.ListItem.New-LargeLarge"); elem.style.display = "none"; </script>


1

This answer may be specific for SharePoint 2010: Using javascript (even better with jQuery) you can accomplish this. On the webpart page, your page viewer part will contain a div element with a unique id (e.g. WebPartWPQ3). Inside this div is an iframe that points to the page to display (i.e. src="your page"). You can use your favorite DOM inspector to find ...


1

Strong Names Strong naming uses a private key to digitally sign an assembly. Strong naming also stamps the assembly with a public key to validate the signature. This technique guards against unauthorized versions of a Web Part. If the public key fails to validate the digital signature, SharePoint Foundation refuses to run the module. When you ...


2

Use the following approach 1.) Create a visual webpart 2.) First add the following on the .ascx page Code for .ascx page <SharePoint:ListViewByQuery runat="server" ID="customlistview" /> 3.)Add the following code to query your list(assuming you have created the site and web objects) Code for .ascx.cs page SPList list = ...


1

When you create a SharePoint project in VS, look at the dialog that appears: it asks which site you want to use for debugging, and the second question is whether you want it to be a sandbox or a farm solution. (or, for an existing project, you can change this in the properties of the project). There's already been a lot written on both, so read up on them ...


0

solution 1 To resolve the web parts errors: Take a note the ID from the Pre-upgrade report: a96a608d-61e7-186c-8fbd-1cebfac7e602 Note: The ID represents the Web part type ID which is referenced within the Content database but the supporting files are not present on the server. In order to resolve the issue we have to logon to the SQL Server and open up ...


2

I can think of following differences between app parts and webparts: SharePoint Server Object Model code is not allowed in app parts (only client object model code is allowed) whereas web parts allow both Sever and Client object model code. App parts provide deployment isolation. However, deployment of web parts causes files to get deployed to 15 hive, ...


0

Ideally you should leverage feature upgrade functionality. Take a look at this example: http://spblog.net/post/2011/05/02/How-to-upgrade-feature-in-SharePoint-2010.aspx Also, a bit closer to your situation (if you use content types to provision list/library fields): ...


2

Because there is no resources file specified in the call to the some resource key in your web part, SharePoint will look in the default places where you can place your resources files in the following order (given that your language is US-English). You must check all resources strings in your web part also ULS should have some string like "Localized ...


0

as far as your error is concern, you must be missing assembly reference of Microsoft.Web.CommandUI. for hiding button, you can try the following code. This will hide library tool tab from your document library public void HideRibbonButton() { //if this is a System.Web.UI.Page SPRibbon ribbon = SPRibbon.GetCurrent(this); ...


1

Try to wrap it in {? } {?{searchTerms} (contentclass:STS_ListItem OR IsDocument:True)}


1

As many of you may know, Microsoft just rolled back SP1 for SharePoint 2013! Besides, SP1 is not a trivial update and will likely require an entire rebuild of your SharePoint farm. The much easier fix is to install the following hotfix: KB 2600088 The issue is that the browser definition files for .NET 4 in conjunction with ASP.NET Forms are not ...


2

Webparts are stored in content database, User Controls are stored in Layouts. Timer jobs configuration is stored in farm configuration database but run under SharePoint timer service account. I believe custom timer jobs dll are stored in Gac.


1

The feature will also need to be activated in order for web part to show up. The next time you deploy a WSP, the feature will remain activated/deactivated depending on its state. That is, if the feature is activated and you deploy the WSP again, you won't need to activate the feature. However, if it is deactivated, it need to be activated again.


3

From a user perspective, there is no difference between web parts and app parts. Both add functionality to a SharePoint page. Technically web parts run inside a SharePoint context, and as a consequence may make an entire page unresponsive if the web part fail to load. An App part run outside SharePoint context and displays its result in an iFrame. If an app ...


0

You can use the app part when you choose the App Application Model. Instead you can use the webpart when you use the sandbox or farm solution. In the last one choice your code run on the server. If you develop for Office 365, I recommend to use the App Application Model. You can read more at ...


0

one more difference i can think of is there is no OOB communication interface between App parts.


0

Well seems when doing Client WebParts (uses Javascript, instead of CodeBehind logic). The control of the Edit Properties, is out of your control. If those of you that find this article, make sure to note that it might be better for you to simply put your Property customization within the webpart itself, refer to Marc D Anderson's Blog Post to read on how ...


0

This can be done using content by query web part and XSL. See this for more info: http://sharepointnadeem.blogspot.com/2011/09/cqwp-xsl-customizations.html CQWP style sheets are present inside a folder "XSL Style Sheets" in Style Library at the root site collection. ItemStyle.xsl file contains the style templates which can applied to the items ...


0

Haha hah! Turns out when dealing with class objects I don't even need to use an Interface. It would seem an interface is required when dealing with primitive objects (string, int, long, etc.) or OOTB Web Parts. So I just removed the interface from the project, replaced all my calls to the class name itself, and set my Provider to only inherit from ...


1

Edit the page in Advanced Mode (from Sharepoint Designer). If the button "Advance Mode" is grayed, you need to enable "Enable Detaching Pages from the Site Definition". You can find this setting on the site in the section "SharePoint Designer Settings" (http://site-name/_layouts/15/SharePointDesignerSettings.aspx)


0

I have written a feature that when activated at the Site Collection Settings, will inject the jQuery library into the Masterpage using a delegate control. That way you can add the library on a site by site basis. Bismarck


0

I had the same problem, realized that my local navigation (Site Settings - navigation - current navigation) had manual entries and the Table of Contents was pulling the entry from that.


-1

You can load the jquery library within each web part. We experienced the same problem and this was the only solution that worked. The master does not load until after the web parts have loaded.


0

I might be totally off on this but I think you would have to make sure your object (class) supports serialization. Basic serialization would require marking the class with the [Serializable] attribute but you might need something more advanced. See here for more details: http://msdn.microsoft.com/en-us/library/4abbf6k0%28v=vs.90%29.aspx In any case using ...


0

For retrieving announcement items in descending order based on ID you should use only OrderBy query: spQuery.Query = "<OrderBy><FieldRef Name='ID' Ascending='FALSE'/></OrderBy>;


1

Andrew Connell is pretty keen on SharePoint 2013 SPAs. He has several blog posts about his experience with Breeze + Angular such as this one "Getting BreezeJS to Work with the SharePoint 2013 REST API". His PluralSight course on the subject will be published very soon along with a sample. There's a "Breeze.Angular.SharePoint" nuget package that loads your ...


0

I found an answer for that and documented it here: http://www.softforge.ch/Blog/Beitrag/9/Content-Search-Web-part,-pass-custom-parameter-to-XSL-for-server-side-rendering You have to inherit from the CSWP and override the OnPreRender method. There in the ControlsCollection you will find the ServerRenderer Control. This Control is used when ...


0

First you will have to set up the lists with the different permissions to lock down what the users have access to. You could then use a content search webpart to return only lists. This should run the query using the authenticated user so they will only be able to see the lists that they have permissions for.


0

Typical, spent days and days trying to resolve this, i post here and then manage to resolve it myself. After reading some Microsoft documentation it would seem all examples i've seen on the internet miss out one key thing, Inside the tag or tag for where you want the webpart to appear there needs to be the tag and then all of the above (minus the tag i ...


0

It depends how List View web part has been customized. XsltListViewWebPart class exposes two properties for setting XSL: XsltListViewWebPart.Xsl XsltListViewWebPart.XslLink In addition SPView class exposes two properties to set XSL: SPView.Xsl SPView.XslLink Please refer an article XsltListViewWebPart – several XSLT tips for a more details. I ...


0

Alternate Custom solution . Copy the OOB “ViewPage.aspx” and place it in the same folder as “CustomViewPage.aspx” Create the custom web part which shows the items of the view with your custom approach. Create a feature to provision the “CustomViewpage.aspx” along with your custom web part. Create a custom list definition. In the schema.xml file of the ...


0

I'm not sure I understand the question exactly, but if you mean showing a different top nav, left nav, and web parts per user it's probably easiest to use the "Target Audience" functionality on the individual navigation links & web parts. With that, you can use AD groups, SharePoint groups, or even individual usernames to show different content on the ...


0

I don't think it will work by adding the web part to the Schema.xml. Try using a feature receiver instead to create the web part and add it to the page with SPLimitedWebPartManager. See [MSDN: Add a WebPart to schema.xml][1] for example code.


4

In order to view the Closed Web Parts, you just need to do: "Add Web Part" in any Web Part Zone Search for the "Closed Web Parts" category in the Web Part selection menu that appears on the Ribbon Your closed web parts should be right there


0

If your site name is https://incorrecturl.omg.com/ABCDPage.aspx . Then please type the url appending "?contents=1" . Example would be : https://incorrecturl.omg.com/ABCDPage.aspx?contents=1 .This will show you all the webparts on ABCDPage.aspx . You can open the closed webpart on this page.


0

See, SP provides List that can be used to store data.. You can retrieve them using Object Model.. SPList.GetItems(SPQuery) (this can be similar to writing SQL Queries).. You might need to learn a little bit of CAML, there are some tools available that prepare the CAML for you (U2U Caml Builder, others search for them).. About people can delete List Items, ...


2

You can use SPSiteDataQuery for getting List data from multiple sub sites of same site collection. Below is the basic code to start with ,bywhich you can use to get all announcement list items from the different sub sites: using (SPSite oSPsite = new SPSite(SPContext.Current.Web.Url)) { using (SPWeb oSPWeb = oSPsite.OpenWeb()) ...



Top 50 recent answers are included