We’re rewarding the question askers & reputations are being recalculated! Read more.

Hot answers tagged

9

You can choose any of the 3 options from below. Option 1: Replace the default PageNotFoundError.aspx in the Page Library – One of the easiest and Convenient way to replace default text in PageNotFoundError.aspx is to either edit the PageNotFoundError.aspx that resides in the Page Library or to delete it and replace it with a Custom error Page that has the ...


6

No, that's not possible in SharePoint, application pages should be in the _layouts folder (or _admin for application pages for central admin). You can put pages as http://localhost/MyCustomDirectory/MyCustomApplicationPage.aspx, but then they should be site pages, which you provision using a "Module" element from Visual Studion. But be aware that then users ...


6

.html and .htm are absolutely identical. In terms of apps there is no difference if you are creating .aspx or .html. But you need to consider your requirements carefully. For example, if you need to host on your page some OOB web parts, for example XSLTListViewWebPart: <WebPartPages:WebPartZone runat="server" FrameType="TitleBarOnly" ID="full" ...


5

I believe this is what you are looking for. You can export a specific file or object from the Export-SPWeb context, not the whole kitten kaboodle. Export-SPWeb -identity "http://sharepoint" -ItemUrl "/default.aspx" -Path "c:\default.aspx" Import-SPWeb -identity "http://sharepoint" -Path "C:\default.aspx"


5

As I understood you need source of the file from content DB to check it into Source Control. Please, try the following code: Add-PSSnapin Microsoft.Sharepoint.Powershell $web = Get-SPWeb <path to web> $file = $web.GetFile('<relative path to file>'); $bytes = $file.OpenBinary(); [System.IO.File]::WriteAllBytes('<path to file on your disk>', ...


5

This is what I have been using to get an SPFieldUserValue from the resolved users and groups in a PeopleEditor control. public static SPFieldUserValue GetPeopleFromPickerControl(PeopleEditor people, SPWeb web) { SPFieldUserValue value = null; if (people.ResolvedEntities.Count > 0) { for (int i = 0; i < people.ResolvedEntities.Count;...


5

List -> List Settings -> there is some Info Path forms server settings link that leads to the page where you can remove customization. Changing default Edit/New pages will not help - you need to modify pages for default content type of this list if you want to go this route. You can also able to do this in SharePoint without needing SP Designer. Navigate ...


5

The search box is a server-rendered control, so you can't just redefine the HTML inside it. But, you can use jQuery to just apply the focus after page load. Drop a Script Editor web part onto the page and do something like this: $(document).ready(function(){ $("#SearchBox input").focus(); }); You might need to tweak the selector, but that one worked in ...


5

Upload them into Site Pages library. If you upload them into Document library this is like document not like page. Use correct library template.


4

On SharePoint2007, you cannot access SharePoint object like SPWeb from JavaScript. Only on SharePoint 2010, the client object model was added that enables interaction with the SPWeb object (see this link) Specifically, the easiest solution for the problem of sending an email from client side code is wtriting an Ajax callback, the client code uses the ...


4

This does not directly answer your question, but: If you use <CustomAction Location="ScriptLink" /> in a Module and deploy that and try writing selectors that don't depend on ID you should be safe.


4

Since you have the list name in the query string use it to get SPList as below SPWeb web = SPContext.Current.Web; SPList list = web.GetListFromUrl(web.Url + “/Lists/ListName/Forms/AllItems.aspx“); Then you can get properties from list. Example: String listTitle = list.Title; If you want to get properties from a list item, you can pass item’s ID in the ...


3

No, the automatic updates will not affect your changes. Whenever you customize a default SharePoint page (DispForm.aspx in your case), it becomes unghosted and the changes you made to the page are stored in the Content database. Now whenever you make a request to that page, the data from both the file system (original page) and the content database (custom ...


3

You need to create the directory structure in your solution for WSPBuilder to package & deploy it correctly. The structure will be something like: 12\TEMPLATE\LAYOUTS\MyProjectName\ Once you've got that, you can create new ASP.NET Web Forms in that folder, and they'll be deployed with the WSP. The URL to access them will be something like http://...


3

I had a glance in the AttachmentsField.UpdateFieldValueInItem call to see where it gets the list of files from for its own use. It appears to use this property: AttachmentsField.Context.Request.Files, the documentation for which is here: HttpRequest.Files Edit: I suddenly realised that you may be trying to access the control in order to save the ...


3

When adding resources to mapped Resource folder you are placing resx files to <hive>\xx\Resources\ folder and your web part cannot access them. Proper place for this kind of resource is IIS application App_GlobalResources folder (x:\Inetpub\wwwroot\wss\VirtualDirectories\<port>\App_GlobalResources\). Fore more info you can read SharePoint ...


3

Responding to your sharepoint-designer tag, I'm afraid, there is no way to style mobile list views through SharePoint Designer. You should use RenderingTemplates for this purpose, as it is described on MSDN: http://msdn.microsoft.com/en-us/library/bb861936.aspx This way, you'll have to deploy a custom RenderingTemplate to the 14/template/layouts/...


3

Apparently, you're looking for class Microsoft.SharePoint.ApplicationPages.LanguageSettingsPage from assembly Microsoft.SharePoint.ApplicationPages.dll, which can be found under following path: c:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\BIN\Microsoft.SharePoint.ApplicationPages.dll There, you will need to investigate ...


3

use a reference to the internal column name wrapped in curly braces <a href="mailto:{@InternalColumnName}">Email</a> The internal name is different from the display name. To find the internal name, navigate to your list settings page, then right click on the column name, scroll down through the complete url until you see "title=" and then copy ...


3

When you select one of those page layouts in your dropdown then you fetch that value by a postback and create a new page in your site based on that page layout. PublishingWeb publishingWeb = PublishingWeb.GetPublishingWeb(web); string pageName = “MyCustomPage.aspx”; PageLayout currPageLayout = FETCH YOUR PAGE LAYOUT HERE; PublishingPageCollection pages ...


3

you can do Response.Write, or you can use asp:Literal. var ltlCnt = new LiteralControl(); string divStart = @"<div>"; ltlCnt.Text += divStart; string divEnd = @"</div>"; ltlCnt.Text += divEnd; this.[divOnPage].Controls.Add(ltlCnt);


3

this function set field limit characters: function setFieldLimitCharacters( field, limit ) { field.unbind( 'keyup change input paste' ).bind( 'keyup change input paste',function(e){ if( $( this ).val().length > limit ) { $( this ).val( $( this ).val().substring( 0, limit ) ); } }); } usage: ...


3

You will need to use CSOM-JS. Refer to this: https://stackoverflow.com/questions/2767461/sharepoint-form-webpart-with-javascript on how your html form should look like and this on how to do basic JS operations in SharePoint 2013: https://msdn.microsoft.com/en-us/library/office/jj163201.aspx (SharePoint 2010: https://msdn.microsoft.com/en-us/library/office/...


3

No need to do this via SharePoint Designer and you should try to Open List > List Settings > Advance Settings > scroll down to dialogs check Yes as shown below.


3

Try accessing the DropDown property of the selectedObject. Haven't tried SPUtility library but looks like (after examining the code) that the HTML object is available in "DropDown" for choice fields. Have a look at the code example here: https://github.com/kitmenke/sputility/blob/master/examples/dropdownchange.html $(countryField.Dropdown) is used to get ...


3

It depends on the page type being used, if it's a Publishing Page, the field name is "PublishingPageContent". If it's a Wiki page, the field name is "WikiField". SharePoint Wiki, Publishing and Web Part Pages UPDATE In case its a modern page in SharePoint Online, it will be "CanvasContent1" Thanks to Gautam Sheth for mentioning this in comments


3

Short answer: Not supported Longer Version: Add a list with links, trim the items in the list and add a list Webpart to the page


2

make sure you check-in and publish your custom master-page cause another user cannot see your work if your master-page not published yet..


2

SpContext.CurrentWeb.Language always returns languages that is used for site creation, if you would like to change languages on your site dynamically you should use `Thread.CurrentCulture.LCID'. If you would like to get this values in .aspx file, you should create module that deploys resources files to the GlobalResources folder. See this post how to do it. ...


2

I looked into this myself and discovered that our user didn't have access to the master page gallery on the -site collection-. Once I provisioned read access to the master page gallery on the site collection, the user was able to get in. David K


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