1, code debugging to determine the process
CD C:\WINDOWS\system32\inetsrv
Appcmd list WP
Pause
Note: Save the batch file to view the process. bat, double-click when you use it
2, similar list new open mode pop-up script
<script type= "Text/javascript" >
function Openframedialog ()
{
var options =sp. UI. $create _dialogoptions ();
Options.url= "http://www.baidu.com";
options.height=160;
Options.dialogreturnvaluecallback=function.createdelegate (Null,closedialogcallback);
Sp. Ui. Modaldialog.showmodaldialog (options);
}
function Closedialogcallback (result,target)
{
if (RESULT===SP. Ui. DialogResult.OK)
{
Javascript:settimeout (' Javascript:return true; ', 8000);
Messageid=sp. Ui. Notify.addnotification ("creating list<b>" +target+ "</b> ...");
}
if (Result ===sp. Ui. DialogResult.Cancel)
{
Sp. Ui. Notify.addnotification ("Operation was cancelled ...", false, "", null)
}
}
</script>
<a href= "Javascript:openframedialog (); >open dialog</a>
Note: Run on the Moss page
3, the Site Backup restore command
PowerShell commands:
Backup: Backup-spsite http://localhost:10086-Path C:\100861.bak
Restore: Restore-spsite http://localhost:10087-Path C:\10086.bak-Force-DatabaseServer Sharepoint2010-databasename
Wss_content_10087test
The command for stsadm:
Backup: C:\Program files\common files\microsoft Shared\Web Server Extensions\14\bin>stsadm-o Backup-url http://localhost-
FileName C:/80.bak
Restore: C:\Program files\common files\microsoft Shared\Web Server Extensions\14\bin>stsadm-o Restore-url/http/ localhost-
FileName C:/80.bak-overwrite
Backup and restore in central administration
Note: The backup feature of central Administration can be restored via PowerShell and Stsadm commands, and the restore function of central Administration requires a SP1 patch.
4. Object model programming for SharePoint 2010
It is recommended that you use a. NET 3.5 reference, and if you use. NET 4.0, you will not be able to use the Microsoft.SharePoint class library after compilation, perfessional development This book
SharePoint does not support. Net 4.0.
5, Browser automatically compatible to IE8
<meta http-equiv= "x-ua-compatible" content= "ie=8"/>
6, Code Modification 2010 site style is 2007
SPSite site = new SPSite (depot path);
SPWeb Web = site. OpenWeb (the site path to be set);
Web. UIVersion = 3; Change to 2007 style
Web. Update ();
7, display error, do not display the friendly interface (2007 to modify the first two, 2010 modify three items)
Modify the Web. config, locate the following three nodes, and modify them to the following values:
<safemode callstack= "true"/>
<customerrors mode= "Off"/>
<compilation debug= "true"/>
In this way, detailed error messages will be displayed.
8. Maximum permissions to see "Site Actions"
<sharepoint:spsecuritytrimmedcontrol authenticationrestrictions= "authenticatedusersonly" Permissions= " Fullmask "
runat= "Server" id= "Yincangwangzhancaozuo" >
<span class= "Siteactionmenu" >
<publishingsiteaction:siteactionmenu runat= "Server"/>
</span>
</SharePoint:SPSecurityTrimmedControl>
9. Modify the upload attachment size setting
Stsadm-o setproperty-propertyname max-template-document-size-propertyvalue 524288000 (500M This is the biggest. )
10. List Import and export
Stsadm-o exportlist-siteurl http://site1/-listname abclist-filename d:\abclist.cmp (export list to a file)
Stsadm-o Importlist-siteurl http://site2/-filename d:\abclist.cmp
Note: Import a file into a SharePoint site and revert to a list
11. Open the anonymous function of the widget view
Stsadm-o Deactivatefeature-url Http://localhost:8084-filename Viewformpageslockdown\feature.xml
Note: In many scenarios, the site is open anonymous, but still need to login, the main view is not open anonymous, need this command. Run again, turn off anonymity, and then open.
12. Release commands for SharePoint patches
D:\moss\officeserver2007sp1-kb936984-x86-fullfile-zh-cn.exe/extract:d:\moss\updates
13. iframe Remove Background
Add allowtransparency= "true" scrolling= "no" to the embedded IFRAME
14. CSS filter with color gradient
<div id= "popupwin_content" onmousedown= "event.cancelbubble=true; style=" Overflow:hidden; Text-align:center;
Filter:progid:DXImageTransform.Microsoft.Gradient (Gradienttype=0,
Startcolorstr= ' #FFE0E9F8 ', endcolorstr= ' #FFFFFFFF ');p Osition:absolute; width:878px; top:0px; height:500px; "
Onmouseout= "style.textdecoration= ' none ';" > Embedded iframe</div>
15. Font size, number of points, pixel corresponding relationship
Chinese font size vs English font size (lb) vs pixel value correspondence (96DPI case):
Number Eighth = 5 lb (5pt) = = (5/72) *96=6.67 =6px
Number Seventh = 5.5 lb = = (5.5/72) *96=7.3 =7px
Small six = 6.5 lb = = (6.5/72) *96=8.67 =8px
Number Sixth = 7.5 lb = = (7.5/72) *96=10px
Small Five = 9 lb = = (9/72) *96=12px
Number Fifth = 10.5 lb = = (10.5/72) *96=14px
Small four = 12 lb = = (12/72) *96=16px
Number Fourth = 14 lb = = (14/72) *96=18.67 =18px
Small three = 15 lb = = (15/72) *96=20px
Number Third = 16 lb = = (16/72) *96=21.3 =21px
Small two = 18 lb = = (18/72) *96=24px
Number Second = 22 lb = = (22/72) *96=29.3 =29px
Small one = 24 lb = = (24/72) *96=32px
Number one = 26 lbs = = (26/72) *96=34.67 =34px
Small beginning = 36 lb = = (36/72) *96=48px
Initial Number = 42 lb = = (42/72) *96=56px
******************************************************************************
Linyu
Source: Http://www.cnblogs.com/jianyus
This article is copyright Linyu and blog Garden Altogether, welcome reprint, but please indicate the source.
Summary of common techniques and methods for SharePoint 2010