Tag Info

Hot answers tagged

8

The IIS virtual web of a SharePoint site is off limits :-) Anyway pages are picked up by a module that redirects all parsing of pages (simplified). Depending on versions you have different options. For SharePoint 2007 we had Site Pages that could be provisioned using the <Module> element, or you could create Application Pages. Site Pages lives in ...


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


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

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


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

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


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


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

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"


3

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


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

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


2

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


2

Looking at a custom EditForm.aspx page in Sharepoint Designer, the form code looks like this: <tr id="idAttachmentsRow"> <td nowrap="true" valign="top" class="ms-formlabel" width="20%"> <SharePoint:FieldLabel ControlMode="Edit" FieldName="Attachments" runat="server"/> </td> <td valign="top" class="ms-formbody" width="80%"> ...


2

Deploy page to {SharePointHive}\Templates\Layouts, access from browser by url: {site-url}/_layouts/{page}.aspx


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

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


2

As far as I know, code-behind usage in SharePoint requires you to specify the full assembly name of the assembly that contains the codebehind class (that is - assuming that your assembly is deployed to the gac). Please see if by using the full name your problem is resolved, ie: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Frameset.aspx.cs" ...


2

The issue is that SharePoint 2010 is on .NET 3.5 (the .NET 2.0 stack). Which means the SharePoint web application does not in anyway support .NET 4. You would need to run that .NET page in a different web application with a different application pool. (You can create the application under the same IIS site, however you MUST use a different application ...


2

Not 100% sure about Visual Studio 2012, but in Visual Studio 2008 & 2010, I had to modify "....csproj" and add a Projecttypes Guids for web projects to make this project web anf let me add ".aspx" or any other web related contents to project. here's link to few known ProjectTypeGuids Hope it helps :)


2

you should use WebRequest $web = Get-SPWeb $webUrl $path = "C:\file.aspx" $request = [System.Net.WebRequest]::Create($url) $request.UseDefaultCredentials = $true #do web request - if exception -> item does not exist try { $response = [System.Net.WebResponse]$request.GetResponse(); if ($response.StatusCode -ne "OK") { write-host "Error: ...


2

I would recommend to avoid using id for just css styling, especially such a general word as #current. Use a class instead: .current-page or something like that. SharePoint renders classes and id for a current menu item in the server side. In your CEWP you don't have access to server side. One possible solution is to use an attribute selector with jQuery. ...


2

Default.aspx is a Site Page and inline C# or VB code is not allowed in Site Pages. So you need to replace the code block (i.e. <%= backUrl.ClientID %>) with the literal id of the element.


2

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


2

The script will never make it to the client because of the redirect. You either need to send the script with the alert and then postback to perform the redirect (yuck) or perform the redirect in the script by doing a location.replace to the URL you want to redirect to...you could also set location.href to the URL as well. So you could do something like ...


2

First thing I want to mention here is the use of list for just 1 item. This is not the way to go. You can use site properties (property bag values) to manage this situation. You can create 3 properties and update values to it. It will save storage and improve performances. You can find in this article how to query property bag values using JavaScript CSOM ...


1

This is a generic error so you need to know what is causing SharePoint to throw that error. Could you please try enabling SharePoint verbose logging? To do this go to Central Administration then Monitoring then Configure Diagnostic logging. Now you need to try and upload the aspx file again to the document library again using ...



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