Document Library item's author is current user?
If you ever want to check if a document library item's author is the current user, here's the code snippet on how to do it: SPFieldUserValue authorUserValue = new SPFieldUserValue (myWeb, myItem[ "Author" ].ToString()); if (myWeb.CurrentUser.LoginName == authorUserValue.User.LoginName ) { // your code will go here > } > Hope this takes away pain from anyone trying to use GetByID ;-) P.S.: sorry all of you I haven't yet replied to your emails - I've been on the road...(
read more)
Del.icio.us |
Digg It |
Technorati |
Blinklist |
Furl |
reddit |
DotNetKicks
Read the complete post at http://pserrano.blogscavedigital.com/PermaLink,guid,dd868977-b98a-47ac-8a79-336d56e2b854.aspx