Tag Info

New answers tagged

1

You can deploy it with module, follow below article https://amalhashim.wordpress.com/2013/02/14/sharepoint-deploy-webpart-page-using-module/ As well you can create feature in your solution,and on the activation of the feature you can add the webpart to the page public override void FeatureActivated(SPFeatureReceiverProperties properties) { SPSite site ...


1

The CSWP can return any content from the search index. Use it on your SharePoint 2013 sites when you are connecting to a search service and want to return indexed search results in your pages. The CSWP returns content that is as fresh as the latest crawl of your content, so if you crawl often, the content that the CSWP returns is more up-to-date than if you ...


0

Today i also faced the similar issue when i tried to import the webpart from Dev site and export to QA site. when i try to add this webpart to the page , it was giving the error."$Resources:core,ImportErrorMessage" . I could not figure out the solution for hours. I came to this stack Exchange Questions and did almost everything which has said here in other ...


0

Well it wasn't that difficult... I simply added a new list named MenuList to my SharePoint site with a column of type Hyperlink(By this coulmn you can mention Item title and URL as well). After that Add the MenuList to a webpart. Now you just have to insert your webpart in your Master page at required position using Designer.


0

For SharePoint 2013 you can also use "Table of Content" web part. As the previous answer resolves only half of the problem, below is the remaining bit. In order to customize "Table of Content" to remove lists, libraries, etc. you can use your custom xsl stylesheet (name it for example SiteLevelStyle.xsl). Then: Add "Table of Content" web part to your page ...


1

Querying and manipulating the DOM elements can be done in SPO Page through App part (Client hosted web part) even though its run inside the iframe on the hosted web page. To do this, you need to wire-up the web part properties with query string as suggested by John-M and I tried few approaches and found none except this idea. SP.RequestExecutor.js doesn't ...


0

When you edit the page you can select 'connections' from the webpart 'context' menu. Use this to connect web parts to the 'master' webpart (in your case list view A) or a filter web part More info here: https://www.youtube.com/watch?v=cYU8bQ6Sw8I ...


0

This is not the problem with Webpart rather this is the problem with the View. Change the view settings -> Style -> Default


1

Assuming you have the MemoryStream, the below code will bring the Save Dialog so user can choose the path Byte[] byteArray = memoryStream.ToArray(); memoryStream.Flush(); memoryStream.Close(); Response.Clear(); Response.ClearHeaders(); Response.AddHeader("Content-Disposition","attachment; filename=filename.zip"); Response.ContentType = ...


0

In the event handler of your Export button use this code Response.AddHeader("Content-disposition", "attachment; filename=YourFile.zip"); Response.ContentType = "application/octet-stream"; Response.BinaryWrite(bytes); //bytes is byte[] of your zip file Response.End();


0

Using the arrow you can select the row and pass it to the connected webpart. If you want to hide the images, then you can use following jQuery code $(document).ready(function(){ $("img[src='/_layouts/images/rbsel.gif']").hide(); $("img[src='/_layouts/images/rbunsel.gif']").hide(); });


0

I saw this post[1] before asking my question but wasn't able to get it to work and thought it might not work with pages with multiple web-parts. Turns out I was wrong and it does work. [1]Filter a list view using URL parameters


0

Have you tried SPServices yet? Check out the link it should work with SharePoint Online, too as far as i could read from the codeplex site. The link given beforehand contains an example on how to retrieve list items with JavaScript/JQuery as you are already using it in your question. You can retrieve all the information required directly into your script ...


0

I've built SharePoint 2013 Client side Apps to do this kinda of thing but if you're new to all this I would suggest using OTB stuff as much as possible, you can get a lot done using list, display templates and some JQuery. I would have a look a the following github project which contains ready made display templates and search display templates which you ...


2

There are three ways to add a Web Part (or something similar) to a SharePoint Online site. Use a Sandbox Solution. You create the Sandbox Solution with the Web Part and upload it the the Solution Gallery of the Site Collection in SharePoint Online the same way you would on-premises. Note that Sandbox Solutions that contain managed code are deprecated and ...


1

I think you should change your approach. Create webpart zone in the place of Search WebParts. Then while creating the page choose this new layout. Then edit page and add the Search WebParts. If you have made customizations to the Search WebPart which you want to reuse, then "Export" the webpart and then upload it to the webpart gallery as a new webpart. ...


0

You can edit the page in SharePoint Designer and then use below snippet which goes and removes the ToolTip. <script type="text/javascript"> $(document).ready(function(){ $("[name='title']").attr('title',''); }); </script>


1

You can find it in the site's recycle bin, just restore it from there.


0

I guess you can populate Content Query web part in gallery again. Go to Web part gallery click on New Document in ribbon, click new and select Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart from Gallery and populate it.


0

You should modify your existing webpart and add logic to read the list item id. Then you can form the URL something like http://webapplication/sites/lists/newslist.aspx?ListItemID=57 In the above 57 is the list item id of that particular news. Now edit the newlist.aspx page. Add a webpart which can read the News List where Id the id value present in ...


0

Try adding this in CSS of your masterpage or as part of editor web part custom css to see if it helps. <style type="text/css"> .ms-webpartPage-root { border-spacing: 0px !important; } .ms-webpartzone-cell { margin: 0px !important; }


0

We had a similar requirement and discovered the following useful example for a custom display template using fullcalendar.js: https://www.pena.id/2014/06/sharepoint-aggregated-calendar-view-using-content-search-web-part-jquery-fullcalendar/ I personally found this quicker and easier to deploy than a custom app plus it integrates nicely with search for ...


1

You can use the control collection using below code foreach (Control c in Page.Controls) { foreach (Control childc in c.Controls) { if (childc is TextBox) { //Use childc.Text property } else if(childc is Label) { ... } //... } }


0

When you edit an app or web part all invisible apps or web parts will appear.


4

The Office Dev Patterns and Practices repo on GitHub has a great sample for provisioning custom web parts on the host web from inside of an app which should be a viable option for your situation. You could use this pattern to allow users to retrieve a custom configured web part and have it inserted into their host web allowing them to insert it at will (you ...


0

I had the same error, and I just closed and reopened my PowerShell window to make it work. Hope this can help in some cases.


0

You can also create a sandbox Webpart and use the below code. Add the user profile dll and using Microsoft.SharePoint.Client.UserProfiles; in your code const string serverUrl = "http://serverName/"; const string targetUser = "domainName\\userName"; // Connect to the client context. ClientContext clientContext = new ...


1

You can add a Script Editor Webpart and use the rest api to get the user profile details. Below is a snippet which show you to get an instance of people manager using rest api $.ajax({ url: "http://<site url>/_api/sp.userprofiles.peoplemanager", type: "GET",headers: { "accept": "application/json;odata=verbose" }, success: successHandler, error: ...


1

The <%# %> syntax in ASP.NET is only valid in a databinding context, such as in <ItemTemplate> containers of the ListView control, or on controls for which you explicitly call the DataBind() function. Similarly frustrating, in this scenario, is that the <%= %> syntax corresponds to literal output, and cannot be used to assign values to ...


0

You can use HTML tag instead of <asp:CheckBox <input ID="myCheckBox" Checked="True" type="checkbox" /> <label><%# MyNameSpace.MySubNameSpace.StaticClass.GetTranslation("My Text") %></label>


0

Can you open the site in SharePoint Designer? Remove all the webparts on the page, and start adding one by one to isolate which one might be causing it. I'm thinking its a reference on the page or maybe the masterpage was edited and not published/checked in by a different user. Careful, that you dont have the page open in multiple tabs/browsers.


0

try the script in the following link: How to Add WebPart to the Publishing Page using PowerShell in SharePoint 2013 - See more at: http://www.sharepointpals.com/post/How-to-Add-WebPart-to-the-Publishing-Page-using-PowerShell-in-SharePoint-2013#sthash.Qb34PJms.dpuf I hope it helps


0

Thanks Ali/Amal. I tried the ?contents=1 but I got an error and it never showed me the Web Parts so I wasn't able to delete them from there. Maybe my case is unique but this is how I was able to fix it. Instead of using DocAve I used PowerShell and exported the site. I then went and created a basic site and proceeded to import the exported site. The ...


0

as amal noted you need to add contents=1 to the url page that shows this error! and remove the offending webpart that has the error or is in error state! it could possibly also be that your using the wrong template when the site is created well i say you i mean avepoint is! The template being used usually must be the same as the one that was used on the ...


0

If I understood what you are doing correctly, I don't think that setup will work. The application page isn't actually being loaded to the browser and thus, the link and javascript will not be available to the user. Ideally you should move the web method to a proper web service structure instead of having it hang off of the application page. If you can't do ...


0

You can add Contents=1 to the page url and see what all webpart are installed. If duplicates exists then you can select those and delete. If that didn't resolve, then you can probably remove all webpart and add it using Insert WebPart option.


0

Try creating a function and call that the "ScriptManager.RegisterStartupScript". For example: string script = @"<script language='Javascript'>function callAlert(){alert('...');}callAlert();</script>";


0

You can use Calendar overlays. You create your calendars separately, but in each section you overlay the other calendars on top of them. So if you have: Home Dept. A Dept. B On Home Home Calendars with Overlays for Calendars in Dept. A and Dept. B Dept. A Calendar has Home and Dept. B calenders overlayed. This doesn't scale very large - you can only ...


0

This should work. Make sure you reference JQuery library and the jquery.SPServices library. $(document).ready(function(){ var userName = $().SPServices.SPGetCurrentUser({ fieldName: "Name" }); var userNameField = $('input[title="YOUR COLUMN NAME"]').val(); if(userNameField == "") { $('input[title="YOUR COLUMN NAME"]').val(userName); } });


1

The Visual Web Part template references the Extensions DLL that comes in .NET 3.5, but does not register all of the namespaces. This means the namespace System.Web.UI.WebControls needed for ListView is missing. Below this line: <%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, ...


1

Yes, there are two parts you'll need to build. Part 1: A way to track which sites a person visits. This may be a httpmodule, or some JS/ajax in your masterpage, or a control in your masterpage or a webpart that is on the landing page of every site, etc. Something that will record in a database somewhere the userid, site title, site url, and datetime of ...


0

I also found the Oslo master page will not let you add Data Sources or Data Views. But I had another weird quirk. After parse html and save, I had to add a web part zone before it would enable the button for Data Source.


1

Is your server's date correct? Maybe it's taking Yesterday's date as Today! If you have multiple server environment, check all the servers.


0

Renaming the views will not help move them to the top. The problem appears to be a unique ID number assigned to each view as it is created. Once you hit the max, no new views appear in the dropdown view selector. I have tried to use designer to modify the view ID number, but that did not work or I did not find it in all places. My work around for this ...


0

You can keep this data in site/sitecollection property bag.


0

Add "?Contents=1" at end of page URL and check if web part appears in list or not. For more detail on this, please have a look at link below: List All web parts on page


0

Sometimes I see this and am able to resolve it by going to site content / pages and manually checking out the page. I am not sure why this is a problem but I have had success with this workaround.


0

web config is evil. hardcode is evil even more.config list might be feasible if you have something to store there, not just a shared list url - I would go that way, especially with a sweet bonus of cloud compatibility if you decide to migrate to apps model in the future. WP properties is probably right way to do it, but as always it depends on how many ...


3

Microsoft's pattern and practices group has published guidance, including a hierarchical configuration manager library. The library uses a list or property bags. You can read more at http://www.microsoft.com/spg. (I would avoid web.config - the change management process for web.config in SharePoint is not reliable.)


2

From maintenance as well as performance I recommend the use of a Configuration Custom List. During the first request, you can pull the configuration values and store it in either SPWeb property bag. Or user HTTPCache. You can decide a time-frame on how long the cached value should be stored (like read the configuration value after 24 hours etc.)



Top 50 recent answers are included