Hot answers tagged aspx
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 ...
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
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
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
...
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
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
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
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
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 :)
1
Parent/child relationships require the parent to exist before the child can be created.
This tutorial shows how to do it. The author has a few other techniques, involving javascript and/or SharePoint Designer.
1
Why not only use on list, with Person as a User Field? Then you would be able to have all information you need in just on list, and extract it easily from the list.
(Works only if the persons are users of your site,
otherwise you need a more graceful solution, involving a custom form page with code behind logic saving data to your two lists)
1
There are 2 ways to create pages:
1.Site Actions -> Create Page.
Here by default you can create a "Body Only" layout based page.
2.Site Actions -> More Options
Here you can select the Publishing page option & then select different layouts available.
You are referring the CREATE PAGE under SITE ACTIONS.
This option by default creates a page ...
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
the best way to do this is to configure BCS (Business Connectivity Service) to fetch data from external database to SharePoint and than work on the lists and libraries SharePoint.
Here are some articles to read:
http://zimmergren.net/technical/sp-2010-getting-started-with-business-connectivity-services-bcs-in-sharepoint-2010
...
1
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. ...
1
This is more of a general HTML/CSS question (except for the fact that you are using CEWP), however, while you are still here why don't you Export the CEWP and simply use a selector (e.g. id="current") and define that with the style for the active one, while changing which of the elements have the #current added on each page.
On the other hand the top ...
1
Another approach is possible :
$web = get-spweb http://server/yoursite
$file = $web.GetFile("$($web.Url)/pages/home.aspx")
[System.IO.File]::WriteAllBytes("$(gl)\$($file.Name)", $file.OpenBinary())
This will write in the current directory the content of the file "Pages/home.aspx"
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
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 ...
Only top voted, non community-wiki answers of a minimum length are eligible



