Tag Info

Hot answers tagged

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 ...


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

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 ...


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.)


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 ...


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 = ...


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

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. ...


1

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


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) { ... } //... } }


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 ...


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 ...


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 ...


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.



Only top voted, non community-wiki answers of a minimum length are eligible