Archive for December, 2007

Posted by Adam Buenz

Sometimes, I am just so used to doing things a certain way that I don't look for new ways of doing it. Fault of my programming personality I suppose, but String.Compare is one of those things that I use religiously now. Let's take a quick example.
We might go about retrieving a some SPUser objects from [...]

Posted by Adam Buenz

Well, this is cool. A SharePoint blogger stepped through my chapter here:
 http://marijnsomers.blogspot.com/2007/11/book-review-real-world-sharepoint-2007.html
He gives an overview of what I covered in my chapter on SharePoint security. He pretty much hits all the points I was trying to get across, which is really nice, puts together a great summary on the concepts that are introduced.
So, if you [...]

Posted by Adam Buenz

I was developing a custom web control that I planned on consuming in a WebPart, and I had some control properties that required a reference to an image. So I had:
Select For Unformatted Code
C#:

[Editor(typeof(ImageUrlEditor), typeof(UITypeEditor))]

in my property decorations.
Well, using the ImageUrlEditor class in order to prompt a UI for selecting an image requires a [...]

Posted by Adam Buenz

I saw this post on the forums:
http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=2270146&SiteID=17
Where the user states (paraphrased):
I've been tasked with delivering a custom auditing solution in Sharepoint 2007 and become a little stuck.
Is there an easy way to translate a UserID (GUID) - returned from calling an instance of SPAuditEntry.UserID - into the corresponding SPUser.Name?
i.e.
string userName = SPUser.getNameByUserID(userID);
The long and short [...]