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


5

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

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

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

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


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

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


2

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


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

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

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


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

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


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

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


1

Just resolved it, by changing default.master to v4.master.. it works !! <%Page.... MasterPageFile="~/_layouts/v4.master" %> from this url got to know ShrePoint 2010 uses v4.master as default master page: http://office.microsoft.com/en-in/sharepoint-designer-help/customize-a-master-page-to-brand-your-site-HA102449505.aspx


1

A couple of things to note; Even though link is a void element the doctype used in SharePoint does not support it. So please consider closing your tags. Another thing is the space in the beginning of your querystring on corev4.css. Both these should not directly cause your problem, but it's worth looking into. Now, for checking if stylesheets are properly ...


1

Why don't you make a Visual Web Part and deploy everything on a Web Part Page? Create a Web Part Page from SharePoint... You can see here is explained the difference between using a Web Part and Application Pages You can achieve everything you need in a Visual Web Part, I hope this helps


1

I have an option in VS2012 to add an Application Page to the project. But it requires your project to be Farm Solution. Otherwise, you can't deploy to SharePoint hive (cause you need to place page to _layouts folder to have codebehind). Also you can install CKS DEV to have more option for adding new items in SP project.


1

At the end the solution was quite simple. I just needed to add a column to the library that shows the value of the look-up as a data field by checking the following (Add a column to show each of these additional fields): This creates a column in the library and the data source that acts like a normal single line of text field and not a look-up.


1

You can create a web part page with out a master page, but that means that you have to put some of the controls from the master page into you page. Alternative you can create a blank master page and use that. But the simplest solution is to just hide the parts of the master page you don't want to show using css like this: <style> .s4-notdlg, ...


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


1

I've given up trying to modify the ASPX to auto-fit the Visio document, but have instead found another solution. Select 'Fit to Window' in Visio before saving the file. This View preference is saved with the file, and when opened using Visio Web Services the file will be opened in 'Fit to Window' mode. In the same way, zooming in on a particular part of a ...


1

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



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