Posts

Showing posts from February, 2010

SharePoint – Send HTML Email with CC, BCC

Ref: http://www.dennispoint.com/Lists/Posts/Post.aspx?ID=28 This is something I needed for one of the projects I worked for in Omaha where they needed the ability to send HTML-formatted emails and be able to define the CC and BCC fields in the email. So I created a method to do this :)   /// <summary> /// Send an html email message /// </summary> /// <param name="web">SPWeb</param> /// <param name="toEmail">email addresses, semi-colon seperated</param> /// <param name="ccEmail">email addresses, semi-colon seperated</param> /// <param name="bccEmail">email addresses, semi-colon seperated</param> /// <param name="subject">email subject</param> /// <param name="body">HTML email body</param> public static void SendEmail(SPWeb web, string toEmail, string ccEmail, string bccEmail, ...

The ListFieldIterator webcontrol

Image
In some circumstances you’ll need to display a SPListItem in its display, edit or new mode in an application page for example. In that case you can iterate through each SPField of an SPList, find the appropriate webcontrol of the field’s datatype and set the appropriate rendering mode of the webcontrol. The quickest / easiest way to do so is by using the BaseFieldControl class.This way it doesn’t matter which field you want to render. The right control will be used. BaseFieldControl webControl = [SPField].FieldRenderingControl; webControl.ListId = list.ID; webControl.ItemId = item.ID; webControl.FieldName = [SPField].Title; webControl.ID = GetControlID([SPField]); webControl.ControlMode = mode; Another way to display a SPListItem in your custom webpart or application page is by using the ListFieldIterator Webcontrol. This webcontrol renders each SPField of a SPListItem with an appropriate webcontrol. That way you get the SharePoint look & feel and the validation of your form ...

Remove the ERROR, BAD WebParts in SharePoint

Just remind to remember, and don’t need searching on the internnet :) Previously, I added a poorly written webpart to my default.aspx page. The consequence of this action is that you aren't able anymore to load the page. In this case, the only thing you have to do is to remove the webpart. Removing the webpart in the webpart gallery doesn't solve this. Resolution: Append ?Contents=1 to the webpart page's URL to display the Webpart Maintenance Page. On that page you can delete the malefactor. Example: http://moss/default.aspx? contents=1

Four new SharePoint 2010 certifications and related courseware available June 2010

Certification Path for IT Pro 70-667 TS: Microsoft SharePoint 2010, Configuring Microsoft Official Curriculum: With the training courses of this MCTS certification, IT Professionals can learn configuration skills for SharePoint, including deployment, upgrade, management and operation on a server farm. 70-668 PRO: SharePoint 2010, Administrator Microsoft Official Curriculum: The training courses of this MCITP certification cover advanced SharePoint 2010 topics like capacity planning, topology designing and performance tuning Learning Resources E-Learning: Course Collection : 10278 – TS: Configuring SharePoint 2010 (16 Hours, Available Early 2010) Classroom: Course 10174: TS IT Pro: Configuring and Managing Microsoft SharePoint 2010 (5 days, Available Mid 2010) Course 10231: Pro ITPro: Designing and Deploying Microsoft SharePoint 2010 (5 days, Available Mid 2010) Certification Path for Developers: 70-573 TS: Micros...

Uninstall SQL Server Embedded

So you installed WSS or MOSS and let it install SQL Server Embedded Edition SSEE by default. Then you upgraded to SQL Standard, Enterprise or maybe you ran the uninstall for SharePoint and realized that the SQL Embedded database wasn’t removed. Here’s how to remove it from the Run command: (on 32-bit platforms) msiexec /x {CEB5780F-1A70-44A9-850F-DE6C4F6AA8FB} callerid=ocsetup.exe (on 64-bit platforms) msiexec /x {BDD79957-5801-4A2D-B09E-852E7FA64D01} callerid=ocsetup.exe

Asynchronous Method Invocation

Image
http://www.codeproject.com/KB/cs/AsyncMethodInvocation.aspx Introduction In this article, I am going to explain asynchronous method calls and how to use them. After playing with delegates, threads, and asynchronous invocation for so long, it would be a sin not to share some of my wisdom and knowledge on the subject, so hopefully, you won’t be looking at an MSDN article at 1 AM wondering why you decided to go into computers. I will try to use baby steps and lots of examples… Overall, I will cover how to call methods asynchronously, how to pass parameters to such methods, and how to find out when a method completes execution. Finally, I will show the Command Pattern in use for simplifying some of the code. The big advantage with .NET asynchronous method invocation is that you can take any method you have in your project, and you can call it asynchronously without touching the code of your method. Although most of the magic is within the .NET framework, it is important to see what is ...

Amazing website for SQL Server developers

  http://www.sqlservercentral.com

SPPersistedObject example

  using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.SharePoint.Administration; namespace SPPersistedObject_Test {     public class Counter : SPPersistedObject     {         [Persisted]         private int number = 99;              public int Number {             get {                 return number;             }             set {     ...

SPSite: The Web application could not be found

Image
You’re trying to use the SharePoint 2010 server side API’s but you’re getting the exception: The Web application at http://… could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application. Then the root cause is probably not: -Misconfigured AAM -Missing App. Pool permissions It is probably that you’re compiling for x86 platform target. Change that to x64 and your code will probably work: