Tag Info

Hot answers tagged

2

This is what we are using currently in one of our projects to check if a page is in edit mode or not: // An accesser indicating whether or not the current page is in design mode. function inDesignMode () { var result = (window.MSOWebPartPageFormName != undefined) && ((document.forms[window.MSOWebPartPageFormName] && ...


2

Try the following: if (document.forms["aspnetForm"]["MSOLayout_InDesignMode"].value == 1) { //do your stuff } If you want to be sure-sure, you can double check with this property: document.forms["aspnetForm"]["MSOSPWebPartManager_DisplayModeName"].value which should have a value of "Design" if a page is in edit mode, or "Browse" if it's in display ...


1

Tinkering around to fix it in the database is not recommended or supported. The old stand by is to navigate to your web part page and add ?contents=1 to the end of the URL. Here you can delete the corrupt web part. Then go back to your web part page and add it back. You can always try exporting the web part from the site it is working in and importing it ...


1

You could add a number column to the list, call it, say, "Sort Order", and then create a view that sorts on the values of your "Sort Order" column.


1

/// <summary> /// Method to add user to subsite /// </summary> /// <param name="userID" userID="domain\username"></param> protected void AddUserToSubsite(string userID) { try { SPUserToken sysToken = SPContext.Current.Site.SystemAccount.UserToken; SPSecurity.RunWithElevatedPrivileges(delegate { ...


1

I'm afraid you miss-use the AAM. AAM are intended to set different absolute URL, but keeping all relative URL the same. SP uses two kinds od URLs in links, dynamic JavaScript code, etc: absolute URL (e.g. http://server/sites/site01) and relative URLs (e.g. /sites/site01). AAM are needed for SP for it to know two or more base addresses can be used with ...


1

This would have worked with other types of webparts, e.g. $PLwebpart = New-Object Microsoft.SharePoint.WebPartPages.XsltListViewWebPart However, the TilesViewWebPart class is abstract, which means that you cannot instantiate it. You would have to do something like creating a class library to implement the webpart, and then use the .dll to add an instance ...



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