Tag Info

Hot answers tagged

9

Ok, there are APIs to support everything you're tyring to do, NEVER DIRECTLY EDIT THE web.config!!!!!!! Follow these easy steps: Package your custom error pages into a solution. Hey, if you're doing the 401 you might want to add a couple of others to support access requests too ;) Deploy the pages to {SP_Root}\Tempates\Layouts\MyErrorPages\ using a ...


7

There are many ways that you can approach this issue and it all comes down to what the desired functionality and behavior is for both the user and the content editor. One of the most common ways I have done this in the past is to use one master page that has all the publishing controls still in it. By default you have to be logged into a site for it to ...


7

The log file should get you the path that SharePoint unsuccessfully tries to resolve. Try adding "~sitecollection" first in the ScriptLink like: <SharePoint:ScriptLink language="javascript" name="~sitecollection/custom/jquery-1.10.2.min.js" runat="server" Localizable="false" /> but this will only work inside the "the_new_osce_portal" Site ...


6

Down in the Standard Colors section you can add more colors by including styles like this: <style> .ms-rteForeColor-11 { color: darkred; -ms-name: ""; -ms-color:"Dark Red"; } .ms-rteForeColor-12 { color: darkred; -ms-name: ""; -ms-color:"Dark Red"; } </style> Similar you can define new background colors using .ms-rteBakcColor-XX ...


5

Why are you deploying your Custom Web Service to the layouts folder at first place? You need to copy the Web service files to the _vti_bin virtual directory Copy the Service1wsdl.aspx file, the Service1disco.aspx file, and the Service1.asmx file to the _vti_bin virtual directory. This is the directory where all default Web services are stored. Copy the ...


5

In the 2nd statement you should have used the site collection specific TOKEN as in: <SharePoint:Scriptlink runat="server" Name="~sitecollection/Style Library/[YOUR SITE]/PathToJqueryLib/jquery-1.10.2.min.js /> The issue with your 3rd (also known as Client-Side JavaScript library reference) is that such constructs do no recognize token-based ...


4

Don't know really HOW, but this code works! Take a look =) public partial class VisualWebPart1UserControl : UserControl { private Microsoft.SharePoint.WebPartPages.ListViewWebPart myListView; protected override void CreateChildControls() { base.CreateChildControls(); SPSite oSiteCollection = SPContext.Current.Site; ...


4

Error 401 is for Unauthorized Access (or Access Denied). In a SharePoint site, "Access Denied" is managed at two levels - IIS and SharePoint. The web.config changes you did are meant for IIS. As "access denied" inside SharePoint site is managed by SharePoint, for IIS there is no 401 and hence no redirection. To set custom 401 page for a SharePoint site, ...


4

If you want to customize a list new\edit\display form there is a couple of ways you can do it. I mean programming ways (not InfoPath). All this methods related to creating custom rendering templates. Every list form has its own rendering template, for list its a "ListForm", for document library "DocumentLibraryForm". All this templates (and otheres) listed ...


4

You can always generate new GUIDs using Online GUID generator or using Visual Studio This is how you can provision your field and use it in a Content Type using FieldId and FieldRef. Follow the sample elements.xml below: <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Field ...


4

Yes, you can change the order. The webpart that displays the posts is just a list view webpart. The trick is this - go to the posts list add a new view, get it sorting the way you want, test. save. go back to your blog homepage edit the page edit the 'posts' webpart's properties select your newly created view in the 'list views' section click OK. Save. ...


4

To achieve this, You can use ListItemCollectionPosition property. It is used together with the RowLimit property to define paging in a query. For your reference, see the sample code available this link http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spquery.listitemcollectionposition.aspx I hope this will resolve your problem.


4

Don't make property List static EDIT: Working code: [ToolboxItemAttribute(false)] public class MyDetailWebPart : WebPart { ... [Personalizable(PersonalizationScope.Shared)] [WebBrowsable(true)] [Category("Category")] [WebDisplayName("Name")] [Description("Desc")] public string Code { get; set; } ... protected override void ...


4

There is an identified issue with SharePoint 2013 ignoring the values set through the Set-SPCustomLayoutsPage cmdlet. See: Custom Access Denied Page in SharePoint 2013. Although the same UpdateMappedPage method and Set-SPCustomLayoutsPage cmdlet exists in 2013, there is an identified bug in the product related to the property. The custom location can be ...


3

If you don't have any luck using the native KPI functionality, you may want to look at some alternatives. After working on Highlighter, I wrote an article on our company blog about the various ways of achieving this: How to create a SharePoint KPI column Free: Javascript: Do the work on the client-side (as pioneered and mentioned by @Christophe) ...


3

For the record, I have created a technique that allows to display any kind of indicator (or generally speaking any HTML) in SharePoint lists. You can find some examples here: Path to SharePoint - Color coding: more examples Path to SharePoint - HTML Calculated Column and Unicode Graphics It may not be the right approach for large scale deployments, but ...


3

I thought about replacing this indicators for my own long time ago, they must be somewhere as images in directory structure, but since we have Pentalogic Highligher installed, I do not worry about anything. (Task lists, ToDo, Priority and blank rows highlighting, countdown, or progress bars, that made all our users via scripts.) All this small little things ...


3

This was nice quest for me. I will not ask why do you need this and I hope that you don't need warning like: Never mess with SharePoint databases directly! I didn't found many articles on net covering this specific issue (no wonder when it is bad practice). The only one was 2007 related: Determining the Configuration Database in a SharePoint 2007 Farm. ...


3

If you've added your ASPX page to a "Layouts" mapped folder, you can access it at any site collection or subsite level, by adding /_layouts/ProjectName/YourAppFile.aspx to url of your site, such as: http://webapp/sites/sitecollection/subsite/_layouts/ProjectName/ApplicationPage.aspx


3

Chris O'Brien wrote a cool post recently about all problems with cached css and javascript files in sharepoint. UPDATE If you are using themable css and EnableCssTheming set to true and your site use some theme (using theme is required), sharepoint will compile your css file into another css file with replacing placeholders, that looks like /* ...


3

You can always 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 ...


3

I believe John is correct if you are limited to Out-of-the-box solutions but there is another option if custom code is available to you. Create your own application page to handle Access Requests and have it generate the email in whatever format you want. Since you would be creating this email in your own code, you would control all addresses used so you ...


3

Paging in SPQuery is implemented through the class SPListItemCollectionPosition. The SPListItemCollection returned by SPQuery.GetItems contains a ListItemCollectionPosition property which is null if no more pages and otherwise can be used assigned to the corresponding property in SPQuery before a new call to GetItems. (Sample at the link above)


3

Assuming your pages reside in a document library typically named as 'Pages' or 'Site Pages' what you need to do is go to manage permissions for the custom page and stop inheriting permissions. You need to give unique permissions to those pages and just grant users/groups whom you wish to make these pages accessible. That ways you can exclude group or a ...


3

My simplest approach was using one Announcement list and jQuery tools (http://jquerytools.org/demos/tabs/accordion.html), plus one CEWP to include relevant scripts (stored in the a Library). We ended-up building a simple web part using SPDataSource with a CAML query to load it.


3

Aboud, actually, there are several ways how to accomplish this. In your case when you have FAQ custom list, i am suggesting you to create additional custom view for displaying list items in accordion. Implementation A. Add custom view for FAQ list in Schema file (Schema.xml), below is provided source code for this View: <View BaseViewID="10" ...


3

Add the ms-dialogHidden class to your outer div, it will hide the content in dialogs: <div class="ms-dialogHidden" style="background-image:url('/Style%20Library/lfr/header.jpg');background-position:left; background-repeat:repeat-x;height:147px;"></div> For more, see here: ...


2

Unfortunately no! Neither is possible without coding your own search results Web part or purchasing a third-party search add-on. The SharePoint search results Web part can only sort results by relevance or date - this is hard coded by Microsoft. I suspect this is because the SharePoint search engine is not really good at sorting by other managed properties. ...


2

Try this public class CustomWebPart : System.Web.UI.WebControls.WebParts.WebPart { private int _instanceId = 0; [Personalizable()] public int InstanceId { get { return _instanceId; } set { _instanceId = value; } } protected override void OnLoad(EventArgs e) { base.OnLoad(e); if (!Page.IsPostBack) { ...



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