Monthly Archives: November 2011

SharePoint Designer 2010 opening MasterPages and ASPX files as text

I recently installed SharePoint Designer 2007 on my new Windows 7 64-bit laptop after installing SharePoint Designer 2010 on the same machine. When I tried to open a MasterPage or newitem.aspx list form, it would only open in SharePoint designer as text with all the options in the ribbon greyed out.

The reason for this is the ASPX, ASP, Master, etc were set to open as text in SharePoint Designer 2010. To change this, open SharePoint Designer 2010 and do the following:

  1. File –> Options
  2. Select the General tab
  3. Click “Application Options” next to “SharePoint Designer Application:”
  4. Select the “Configure Editors” tab
  5. Select ASPX ASCX ASHX….
  6. Make Sure that “SharePoint Designer (Open as HTML)”
  7. Click OK

Using XSLT, AJAX and jQuery to improve OOTB SharePoint Lists

Using XSL can completely change the way that any standard list view is displayed. There is a great video from Laura Rogers demonstrating what can be done with the XSLT List View in SharePoint Designer here.

XSLT
You can also build your own XSL sheets and use them in the style library by linking them in the web part properties.

Here is a standard web part view of a custom list:

Here is a standard web part view with custom XSL applied:

COM, jQuery and AJAX
Calling the SharePoint Client Object model with JavaScript, we can add items to the list without refreshing the page.
Inside the web part’s AJAX settings we can set the auto refresh so the list displays the new item (again without refreshing the page).
In this example, jQuery sets a fade-in animated gif to show the item being added to the list once send has been pressed. The fade-out effect is applied to the gif once success has been returned to the JavaScript function.
Building solutions like this can create complete customisable solutions using only custom lists in a modern integrated (no refresh) style.