How to enable a custom web part class file to be refreshed at regular interval of time, without affecting the entire page where its placed.
Hi,
I am calling a web service in the web part class file where it gets the data. I need to call the service at regular intervals of time which is in the web part, is there a way to get the web part refreshed automatically at certain intervals of time.
Rayudu
You can use Ajax for automatic refreshing.
Add a timer control into an Ajax Update panel within your custom web part and execute your code to refresh the field values within the Timer_Tick() event.
You can also control the timer interval to 10 minutes or so using the Timer.Interval property.
This will always enable your page to remain with only the web parts getting refreshed.
I just found
a blog post which describes this in detail with screenshots.
Similar Messages
-
How to play share point library video in custom web part
Hi ,i want to play my share point library videos and computer videos in custom web part , how can i do this ,playing static video and library video both are common.
Thanks,
Madhu.Do you want to create a player from scratch or use eg. the Silverlight media player:
http://jomit.blogspot.de/2009/12/using-silverlight-media-player-of.html
or alternatively html5 and the <video> element (will probably require a couple of tweaks in the master page) ?
Kind Regards
Bjoern
http://spviking.com
Twitter: Follow @bjoern_rapp -
How to fix javascript error/bug on custom web part of SharePoint 2013
I have a custom web part with serveral business fields. This web part is installed on DispForm, EditForm an NewForm.
But, I click on Attach File button and a javascrit error is throw on my browser's status bar.
Line: 5279
Character: 5
Code: 0
URI: http://mysite:4000/_layouts/15/form.debug.js?rev=vyMg8qjZfJ8La1jn7bQ2cg%3D%3D
How to solve this problem? I think it is a javascript conflict
Tarcísio Corte [email protected]Hi,
1. You can create a simple demo web part without your custom code firstly, then insert it into your form pages to see if the similar issue would occur. If it works, then add your
other code into it one after one. By doing this, it will be easier to find out the root cause of this issue.
2. What browser do you use? Please try to use IE 10(SharePoint 2013), IE8(SharePoint2010).
3. You can also debug your code using IE F12 Developer Tools.
http://blogs.msdn.com/b/kaevans/archive/2011/04/25/debugging-javascript-with-the-ie-developer-tools.aspx
If the issue still exists, I can suggest you provide more information for further research.
Thanks,
Dennis Guo
TechNet Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Dennis Guo
TechNet Community Support -
How do I get a web part to display items from a dropdownlist?
I have a DropDownList that am filling with items from a list. The part of my code that am using to read the list and populating the drop down works just fine. I am now trying to figure out how to display the contents of the drop down on a web part. I know
it sounds like a straight forward and easy thing to figure out, but I have blanked out. Does anyone have a snippet I can take a look at? This is how I am currently reading from a list to create the drop down...
protected override void CreateChildControls()
string title = string.Empty;
EditorChoices = new DropDownList();
string siteUrl = "mySite";
using (SPSite site = new SPSite(siteUrl))
SPWeb web = site.RootWeb;
SPList list = web.Lists["testList"];
SPQuery testQuery = new SPQuery();
testQuery.Query = "<Query><Where><Geq><FieldRef Name='Title'/>" +
"<Value Type='Number'>10</Value></Geq></Where></Query>";
foreach (SPListItem item in list.GetItems(testQuery))
title = Convert.ToString(item["Title"]);
EditorChoices.Items.Add(title);
Controls.Add(EditorChoices);
base.CreateChildControls();
ChildControlsCreated = true;
I basically want to display the items returned from the query, which are now in the dropdownlist, to be displayed on my custom webpart. I really appreciate the help.
Thanks
UPDATE: My dropdownlist is a web part property. So when editing the web part, the drop down control appears in the web part property. Now that part is working just fine. The part am having an issue with is, the second part of my requirement is that I want
to display that same information within the drop down on the web part. Not as another drop down, but just to display them as a vertical text list on the web part.Hello,
>I want to be able to display all the entteries in the dropdown,
Could you please provide more information? as per your description fisrt part is done, which was filling data in dropdown list. So what is next?
If you want to get selected value from dropdown or filter value then you may try this link:
http://bilbrobloggins.com/sharepoint/dropdown-list-box-filter-web-part-in-sharepoint-ndash-part-three/
http://tmullenssharepoint.wordpress.com/2013/04/12/sharepoint-custom-web-part-properties-from-sharepoint-list/
Correct me if i misunderstood
Hemendra:Yesterday is just a memory,Tomorrow we may never see
Please remember to mark the replies as answers if they help and unmark them if they provide no help -
Hi All,
How to display selected Month like jan,feb,march in single page with different webparts.
I created 3 webparts and selected(jan,feb,march) but when page refreshes all webparts are displaying current month(December).
Here i attached the screen shot, where December should be shown as (January and February)
Kindly check and guide me in right track.
Thanks
Prabhat.
Madhu PrabhatHi,
To develop a custom web part, you can take a look at the links below with steps in detail for a start:
Creating Web Parts for SharePoint
http://msdn.microsoft.com/en-us/library/ee231579.aspx
Sharepoint 2013 Create a Visual Web Part
http://raquelalineblog.wordpress.com/2013/04/25/sharepoint-2013-create-a-visual-web-part/
Another three links for your reference:
http://www.learningsharepoint.com/2012/12/24/how-to-create-a-custom-webpart-in-sharepoint-2013/?goback=%2Egde_3911588_member_198759022#%21
http://www.youtube.com/watch?v=9iK8IPUB87w
http://sptechbytes.blogspot.com/2013/10/sharepoint-2013-creating-visual-webpart_26.html
Here are some samples of custom calendar web part for your reference:
http://www.codeproject.com/Articles/108676/SharePoint-Custom-Calendar
http://gunnarpeipman.com/2009/01/creating-sharepoint-global-calendar/
https://blog.metrostarsystems.com/2013/10/21/creating-a-custom-sharepoint-calendar-rollup/
You can also do more customization by adding your own logic in it.
Best regards
Patrick Liang
TechNet Community Support -
Hi,
SharePoint 2013 RSS
Viewer web part failing to complete loading when the page loads.
This happens when having RSS Viewer and then adding a Custom webpart with an updatepanel and timer control.
I had used Ajax update panel and timer control to load the web part asynchronously after the main page is fully loaded.
The RSS-Viewer web part hangs in loading state while the custom webpart loads just fine.
The issue occurs when an like button click or Timer Tick event fires after the page
is loaded.
Haven't been able to track the issue.
Couple of workaround I tried to call a server side button click event from the custom web part after the page gets fully loaded using JQuery shown below did not work out either.
$(document).ready(function () {
$('#<%= netButton2.ClientID %>').click();
And
document.onreadystatechange = function () {
if (document.readyState == "complete") {
$('#<%= netButton2.ClientID %>').click();
Please let me know how to resolve this issue.
Thanks,
FranklinHi Johan,
The assignment of this user on the given task might be corrupted. Try to remove the resource from the task, publish the project, assign the resource again and publish again the project. If it is not working, try to unpublish the task (column "publish")
and publih it again.
Hope this helps,
Guillaume Rouyre, MBA, MVP, P-Seller | -
Hi
How do we differentiate on when to allow custom web parts and when to use out of the box.
What are the performance issues involved when we deploy a custom web part into the SharePoint server.
Why do some companies prefer to allow only out of the box features, and no custom work is done?SharePoint is a powerful, flexible server product that can provide a wealth collaboration environment right out of box.
Best answer for your question is depend upon your requirement. Sometime Out of Box features will solve all the problem with little designing. But sometime your requirement need a Custom Web part / solution.
With OOTB implementation the big advantage is easy to trouble shoot & fix the issues. You will also found tons of blogs on internet for OOTB features. In custom development, its hard to troubleshoot & identifying whether its SharePoint issue or Custom
code issue.
check the below article for more ideas.
http://social.technet.microsoft.com/Forums/sharepoint/en-US/1e7845ef-61e0-4d01-bb6c-92519e6d7139/sharepoint-2010-outofbox-best-practices?forum=sharepointgeneralprevious
http://www.cdh.com/media/articles/Pages/SharePoint-out-of-the-box---To-customize-or-not-to-customize.aspx
Master List of SharePoint 2010 On-Premises Custom Development Best Practices
http://i.zdnet.com/whitepapers/Quest_WPW_SharepointDev_Custom_US_KS_v3.pdf
Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog -
Custom web parts in SharePoint 2013 becomes inactive when the session is idle for long time.
Hi,
We have a search center site with custom web parts and custom master pages. When the session is inactive for long time all the custom web parts in the page doesn't work, unless we close the browser and open it. Where as this is not the case with the
OOB web parts. We are not able to identify the root cause as it works with OOB web parts and not the custom web parts.We were able to find that by increasing the session timeout of the web application we can avoid this issue.We do not want to increase the
session timeout as the OOB web part works perfectly even when the user session is idle for long time.Is there any other alternative where we can acheive the same for custom web parts when the session is idle for long time?
Thanks,
SaranyaHi Saranya,
According to your descirption, my understanding is that when the session is long time idle ,then custom web part will not work.
I suggest you check if you have enable the session in the Page Level in the web.config. By default SharePoint disable the session state.
In the web.config, you will see <page enableSessionState> tag. You can modify like below and test if it works.
<pages enableSessionState=”true” ….. />
Here is a detailed thread for your reference:
Use Session State in SharePoint
Best Regards
Zhengyu Guo
TechNet Community Support -
Error:System.Web.HttpUnhandledException in Custom Web part for Sandbox solution
Please Help...
I have a sandbox solution for Custom Web part which has a 'Visual Web Part(sandbox)'.
The solution builds, Packages & deploys successfully.
But when adding this custom web part on a Sharepoint 'Web Part Page' it throws up the below Error:
Same code when deployed as a Farm Solution works all well.
Only difference between the two solutions being Farm solution has 'Visual web part'
and Sandbox solution has 'Visual web part(sandbox)'
ERROR:
======================================================
[SPUserCodeSolutionExecutionFailedException: Unhandled exception was thrown by the sandboxed code wrapper's Execute method in the partial trust app domain: An unexpected error has occurred.]
Server stack trace:
at Microsoft.SharePoint.UserCode.SPUserCodeApplicationHostAppDomainRef.Execute(Type userCodeWrapperType, SPUserCodeCachedAssemblyGroup userAssemblyGroup, Guid siteCollectionId, Byte[] binaryUserCodeToken, Byte[] proxyOperationToken, SPUserCodeExecutionContext
executionContext)
at Microsoft.SharePoint.UserCode.SPUserCodeApplicationHostAppDomainRef.Execute(Type userCodeWrapperType, SPUserCodeCachedAssemblyGroup userAssemblyGroup, Guid siteCollectionId, Byte[] binaryUserCodeToken, Byte[] proxyOperationToken, SPUserCodeExecutionContext
executionContext)
at Microsoft.SharePoint.UserCode.SPUserCodeAppDomain.Execute(Type userCodeWrapperType, SPUserCodeCachedAssemblyGroup userAssemblyGroup, Guid siteCollectionId, Byte[] binaryUserCodeToken, Byte[] proxyOperationToken, SPUserCodeExecutionContext executionContext)
at Microsoft.SharePoint.UserCode.SPUserCodeWorkerProcessProxyForShim.ExecuteInternal(Type userCodeWrapperType, SPUserCodeCachedAssemblyGroup userAssemblyGroup, Guid siteCollectionId, Byte[] binaryUserCodeToken, Byte[] proxyOperationToken, SPUserCodeExecutionContext
executionContext)
at Microsoft.SharePoint.UserCode.SPUserCodeWorkerProcessProxy.Execute(Type userCodeWrapperType, SPUserCodeCachedAssemblyGroup userAssemblyGroup, Guid siteCollectionId, Byte[] binaryUserCodeToken, Byte[] proxyOperationToken, SPUserCodeExecutionContext
executionContext)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.SharePoint.UserCode.SPUserCodeWorkerProcess.ExecuteDelegate.EndInvoke(IAsyncResult result)
at Microsoft.SharePoint.UserCode.SPUserCodeWorkerProcess.Execute(Type userCodeWrapperType, SPUserCodeCachedAssemblyGroup userAssemblyGroup, Guid siteCollectionId, SPUserToken userToken, String currentAffinity, SPUserCodeExecutionContext executionContext)
at Microsoft.SharePoint.UserCode.SPUserCodePoolableProcessConnection.Execute(Type userCodeWrapperType, SPUserCodeCachedAssemblyGroup userAssemblyGroup, Guid siteCollectionId, SPUserToken userToken, String affinity, SPUserCodeExecutionContext executionContext)
at Microsoft.SharePoint.UserCode.SPUserCodeExecutionHost.Execute(Type userCodeWrapperType, Guid siteCollectionId, SPUserToken userToken, String affinity, SPUserCodeExecutionContext executionContext)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
Exception rethrown at [1]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.SharePoint.Administration.ISPUserCodeExecutionHostProxy.Execute(Type userCodeWrapperType, Guid siteCollectionId, SPUserToken userToken, String affinityBucketName, SPUserCodeExecutionContext executionContext)
at Microsoft.SharePoint.UserCode.SPUserCodeExecutionManager.Execute(Type userCodeWrapperType, SPSite site, SPUserCodeExecutionContext executionContext)
at Microsoft.SharePoint.UserCode.SPUserCodeWebPartRemoteExecutionHelper.<>c__DisplayClassa.b__9()
at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)
at Microsoft.SharePoint.UserCode.SPUserCodeWebPartRemoteExecutionHelper.ExecuteRequestInSandBox(HttpContext context, SPWeb web, SPWebPartManager manager, SPUserCodeWebPart userCodeWebPart)
[HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown.]
Server stack trace:
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at Microsoft.SharePoint.UserCode.SPUserCodeWebPartWrapper.ExecuteHttpRequest(SPUserCodeWebPartHttpRequestContext webPartExecutionContext, SPUserCodeWebPartHttpResponse httpRequestResponse)
at Microsoft.SharePoint.UserCode.SPUserCodeWebPartWrapper.Execute(SPUserCodeExecutionContext executionContext)
at Microsoft.SharePoint.UserCode.SPUserCodeApplicationHostAppDomainRef.ExecuteWrapper(SPUserCodeWrapper wrapper, SPUserCodeExecutionContext executionContext)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
at Microsoft.SharePoint.UserCode.SPUserCodeApplicationHostAppDomainRef.CodeToExecuteWrapper.EndInvoke(IAsyncResult result)
at Microsoft.SharePoint.UserCode.SPUserCodeApplicationHostAppDomainRef.Execute(Type userCodeWrapperType, SPUserCodeCachedAssemblyGroup userAssemblyGroup, Guid siteCollectionId, Byte[] binaryUserCodeToken, Byte[] proxyOperationToken, SPUserCodeExecutionContext
executionContext)
[InvalidOperationException: Using Menu.DynamicHoverStyle requires Page.Header to be non-null (e.g. <head runat="server" />).]
at System.Web.UI.WebControls.Menu.EnsureRenderSettings()
at System.Web.UI.WebControls.Menu.OnPreRender(EventArgs e, Boolean registerScript)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)Hi!!
Sure, Please find .cs and .ascx script below
==========.ascx===========================
<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DynamicMenuWP.ascx.cs" Inherits="MenuWebPartProject.DynamicMenuWP.DynamicMenuWP" %>
<asp:Menu ID="siteStructure" runat="server" Orientation="Horizontal" StaticPopOutImageTextFormatString="" DynamicHoverStyle-BackColor="#CBE3F0" SkipLinkText=""
StaticSubMenuIndent="10px"
BackColor="#000000" CssClass="BIMenu" Font-Names="Verdana" Font-Size="1em" DynamicHorizontalOffset="2" onmenuitemclick="siteStructure_MenuItemClick" Target="_blank">
<StaticSelectedStyle
BackColor="#507CD1" />
<StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" CssClass="BIMenuStaticformenu" />
<DynamicHoverStyle BackColor="#CBE3F0" />
<DynamicMenuStyle BackColor="#F2F3F4" BorderColor="#A7B4CE" ForeColor="Black" />
<DynamicSelectedStyle BackColor="#507CD1" />
<DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" CssClass="BIMenuDynamicForMenu" />
<StaticHoverStyle BackColor="#284E98" ForeColor="White" />
</asp:Menu>
==========.cs===========================
using System;
using System.ComponentModel;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace MenuWebPartProject.DynamicMenuWP
[ToolboxItem(false)]
public partial class DynamicMenuWP : System.Web.UI.WebControls.WebParts.WebPart
protected override void OnInit(EventArgs e)
base.OnInit(e);
InitializeControl();
protected void Page_Load(object sender, EventArgs e)
if (!IsPostBack)
ScorecardStructure ss;
List<ScorecardStructure> listSS = new List<ScorecardStructure>();
using (SPWeb web = SPContext.Current.Web)
SPList lists = web.Lists["MenuItems"];
if (lists.ItemCount > 0)
foreach (SPListItem item in lists.Items)
ss = new ScorecardStructure();
ss.title = Convert.ToString(item["Title"]);
ss.ParentID = Convert.ToInt32(Convert.ToString(item["Parent ID"]));
ss.ParentName = Convert.ToString(item["Parent Name"]);
ss.MenuID = Convert.ToInt32(Convert.ToString(item["Menu ID"]));
ss.menuName = Convert.ToString(item["Menu Name"]);
ss.url = Convert.ToString(item["URL"]);
ss.friendlyName = Convert.ToString(item["Friendly Name"]);
listSS.Add(ss);
if (listSS.Count > 0)
List<ScorecardStructure> y = listSS.Where(s => s.ParentID == 0).ToList<ScorecardStructure>();
foreach (var x in y)
MenuItem newMenuItem = new MenuItem(x.menuName.ToString(), x.MenuID.ToString());
siteStructure.Items.Add(newMenuItem);
AddChildMenuItems(listSS, newMenuItem);
private void AddChildMenuItems(List<ScorecardStructure> menuData, MenuItem parentMenuItem)
if (menuData.Count > 0)
List<ScorecardStructure> childItems = menuData.Where(s => s.ParentID == Convert.ToInt32(parentMenuItem.Value)).ToList<ScorecardStructure>();
foreach (var v in childItems)
MenuItem newMenuItem = new MenuItem(v.menuName.ToString(), v.MenuID.ToString());
newMenuItem.NavigateUrl = v.url.ToString();
parentMenuItem.ChildItems.Add(newMenuItem);
// This code is used to recursively add child menu items filtering by ParentID
AddChildMenuItems(menuData, newMenuItem);
protected void siteStructure_MenuItemClick(object sender, MenuEventArgs e)
string st = e.Item.NavigateUrl;
if (!(st.Equals(string.Empty)))
HttpContext.Current.Response.Redirect(st);
class ScorecardStructure
public string title { get; set; }
public int ParentID { get; set; }
public string ParentName { get; set; }
public int MenuID { get; set; }
public string menuName { get; set; }
public string url { get; set; }
public string friendlyName { get; set; }
public bool IsPostBack { get; set; } -
Create custom web-part page with OOTB page layout using CSOM (Javascript)
Hi,
I need to create a custom webpart page with a OOTB page layout (eg. Header 3 column footer) using JSOM.
I found a link to do this using CSOM: http://spdevlab.com/2013/03/28/creating-wiki-web-part-and-publishing-pages-via-csom-in-sharepoint-2010/
But here i have to copy the page template from 15 hive and store it in a resource file and I am also getting error as "The request message is too big" and to fix this I need to run a powershell script but I need the code to run in SharePoint online
also.
Isn't there a simpler piece of code in which I can enter the name of the page layout(OOTB/Custom) while creating a page in JSOM as we have in SSOM?
Thanks for the help
sunnyHi,
According to your post, my understanding is that you want to create a custom web part page layout template.
There are some articles about how to create the custom web part page layout template, you can refer to them.
http://www.manageprojectsonsharepoint.com/blog/2011/03/14/creating-your-own-web-part-page-layout-template/
http://sandeeppawar.blogspot.com/2012/06/create-custom-web-part-page-template.html
http://doitwithsharepoint.blogspot.com/2011/08/create-web-part-pages-with-custom.html
Thanks & Regards,
Jason
Jason Guo
TechNet Community Support -
Add a custom web part-tasklist- in my MySite Web Appln
hi,
In my MySite home page, i would like to add a web part/UI which displays the my pending approvals in my KM web application.
as i will be the approver of many documents uploaded by users in the KM site.
how can i create this UI and show this on my MySite Web Appln and be available whenever a user logged in.
as per my understanding mysite will be created when he clicks on the top right corner - "sites" link in my Km web appln
after i configure Uuser profile service apln. and create a mysite host site template. and i have enabled the option of "enable selef site creation ".
so how can i add this web part on page load / on site creation of mysite web appln.
help is appreciated.To configure Person Sites in SP 2013 go through the following article.
https://www.nothingbutsharepoint.com/sites/itpro/pages/sharepoint-2013-creating-and-configuring-mysite.aspx
When you are on your personal site on quick launch (left navigation) you will see Tasks option. This will be roll-up of all tasks. I am pretty sure you can use this as per your need as it gives different options e.g. Active, Completed and also there is a
filter as well.
Read more about this here
http://blog.blumshapiro.com/blog/2013/06/11/aggregate-all-of-your-tasks-with-sharepoint-2013/
Amit -
2013 Custom Web Parts in Page Layouts not showing for users
Custom Web Parts in Page Layouts not showing for users
I have created a master page in the root site collection for a subsite I am developing. I created content types and custom page layouts for the pages within the subsite.
I used the snippet tool in the design manager to create web parts and page field markup which I copied into the custom layout HTML pages in the root site collection. For instance I have an image viewer web part that I place there to serve as a section title.
The problem is that I can see all these customer layout page parts no problem but my users cannot. This leads me to believe its permissions, I am site owner of both the subsite and root site collection.
The users that cannot see the web parts are site members of the site and restricted read users on the root site collection (where the layouts are stored).
What gives I'm finding it hard to understand why a snipet generated web part wouldn't show in all pages created from that layout page.
Any help would be appreciated, Havent found anything on this issue online. weird.It is a permission issue indeed. Fix is simple, make sure you check out the page layout page, then check it back in as published version.
John Architect -
Implementing Exception Handling Application Block in custom web parts, event receivers
hi,
I am currently implementing try {} catch(Exception expp) { throw expp;} to handle exceptions in my intranet appln.
I have several custom web parts, event receivers, few console applciations as timer jobs etc. If i want to implement a robust exception handling what should be the approach. by searching, i saw, ms patterns n practices provides the
appln blocks.
But I think[ pls correct me if i am wrong ] those appln blocks are meant for asp.net applns ONLY.
if not, anyone has implemented those appln blocks in SP development? if yes, can anyone provide one sample / link to implement Exception Handling in SP.
help is appreciated!Hi,
Here are some articles for your reference:
Handling Error Centrally in a SharePoint Application
http://www.codeproject.com/Articles/26236/Handling-Error-Centrally-in-a-SharePoint-Applicati
Using Microsoft Enterprise Library Application Block in SharePoint
http://www.codeproject.com/Articles/21389/Using-Microsoft-Enterprise-Library-Application-Blo
Exception Handling in SharePoint
http://spmatt.wordpress.com/2012/02/01/exception-handling-in-sharepoint/
Best Regards
Dennis Guo
TechNet Community Support -
SP 2013 - Use PowerShell to Add a Custom Web Part to a Page
Hello Community,
I need to add a custom web part to a page using PowerShell - has anyone done this and if so please provide guidance and code examples.
Thanks!
Tom
Tom Molskow - Senior SharePoint Architect - Microsoft Community Contributor 2011 and 2012 Award -
Linked-In - SharePoint GypsyBTW, here is my current code:
#$web= Get-SPWeb -Identity "http://c4968397007/sites/BRE"
$Url = "http://c4968397007/sites/BRE"
$pageUrl = "/SitePages/Home"
$webpartzone = 2
$index = 0
$fileName = "wp_DistrictHomePage_VisualWebPart1.webpart"
$web = Get-SPWeb $Url
$web.AllowUnsafeUpdates=$true
$webPartGallery = $web.Lists["Web Part Gallery"]
Write-Host "Searching webpart $fileName in web part gallery"
if($webPartGallery -eq $null)
Write-Host("Unable to retrieve Webpartgallery");
$webpart = $null;
$webpart=$webPartGallery.Items | ? { $_.Title -eq $fileName}
if($webpart -eq $null) {
Write-Host("Unable to retrieve webpart: $fileName") -ForegroundColor Red
else {
Write-Host("----------Adding Webpart--------")-ForegroundColor Yellow
$webpartmanager=$web.GetLimitedWebPartManager($pageUrl, [System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared)
$errorMsg = "";
$xmlReader = New-Object System.Xml.XmlTextReader($webpart.File.OpenBinaryStream());
$webpart = $webpartmanager.ImportWebPart($xmlReader,[ref]"Error")
$webpartmanager.AddWebPart($webpart, $webpartzone, $index);
Write-Host("Webpart is added successfully") -ForegroundColor Green ;
$SiteURL =$Url
#---------------Test Page----------------------------
$PageName="Test.aspx"
$page=$web.lists["Pages"].Items | ? {$_.Name -eq $PageName}
$page.File.CheckOut();
Add-WebPartToPage "$SiteURL/Pages/$PageName" "Header" 0 "My Custom WebPart"
$page.File.CheckIn("Added Web part to a page");
$page.File.Approve("Added Web part to a page");
Tom Molskow - Senior SharePoint Architect - Microsoft Community Contributor 2011 and 2012 Award -
Linked-In - SharePoint Gypsy -
Custom web part in SharePoint Online for "User segments"
Hi Experts,
I was refferd here from the SharePoine Online community. http://community.office365.com/en-us/f/148/p/278071/851153.aspx
I was following this article to implement user segment in SharePoint Online http://blogs.msdn.com/b/adaptive_experiences_in_sharepoint_2013/archive/2012/11/14/set-up-user-segmentation-to-drive-adaptive-experiences-in-a-product-catalog-in-sharepoint-2013.aspx
However, this seems to require a custom web part to be build and deployed in SharePoint Online.
Anyone has made user segment work in SharePoint Online? Anyone has done this custom web part before?
Thank you,
Aswath NSBy default the Site Users web part shows all the users and groups who have been give direct permission to the site. That would not include anyone who was given permission by being added to a group. You can modify the web part settings to show
a list of people in the Members group of the site or any other specific group. But there is no setting to show all the users who have access.
Paul Stork SharePoint Server MVP
Principal Architect: Blue Chip Consulting Group
Blog: http://dontpapanic.com/blog
Twitter: Follow @pstork
Please remember to mark your question as "answered" if this solves your problem.
Maybe you are looking for
-
How do I use VPN for file sharing?
Hi folks, hope you can help. I need to find a method for file sharing between my company's two offices, which are not only in different countries but also use both PCs and Macs. I think setting up a VPN is the way forward. My file server is a Mac Min
-
Hello all, I'm using the below database. Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production PL/SQL Release 11.2.0.3.0 - Production CORE 11.2.0.3.0 Production TNS for Linux: Version 11.2.0.3.0 - Production NLSRTL Version 11.2
-
I would like to create a custom datagridview column containing text images and MS Word OLE objects
I am an old time LabView programmer going back to 2.0. But moved on with my career several years ago. But here I am back attempting a custom column in dataviewgrid control. .NET is hard. My goal is to read in an MS Word document and parse it out
-
I am not able to open the app in Creative Coud
i tried uninstalling and installing creative cloud but still same problem, when i go to apps a download error message appears (404) please i need some help
-
Can I train Siri ??
Can I train Siri to better understand me when I a dictating text?? I always have to make corrections and if I don't proof and send it, people probably think I am drunk. I switched from Blackberry to iPhone because of needing voice command device