Posts

SharePoint 2010: Adding List Attachments as Links in a DataView Webpart

Image
As silly as it seems to me, providing links to list attachments in a data view is still not an OOB option in SharePoint 2010. I read a lot about how you should just use document libraries instead, and while that may be a better option in some ways, it doesn't always provide the best user experience, especially when you want to provide a non technical user a way to have files associated with a custom list item, or in my case, as Task List item. The only OOB way to link a list to a document library such that you could later provide a filtered view of the documents was to link up some sort of common data point (such as a project number, or a list item ID number). While that's not a big deal usually, the goal to achieve as little effort for the end user is always paramount in my firm. Feel free to comment on how best to automatically link an item(s) to a document library without custom code or a third party solution. For me, the easiest thing for my users, is to simply attach to th...

ReBlog: Things that Should be Easy: Presence Awareness in WSS V2 and WSS V3

Things that Should be Easy: Presence Awareness in WSS V2 and WSS V3 I found this post today when working out some issues I seem to be having on my machine while looking at the presence of users. There's some good stuff in here. When I get the issues worked out, I will detail my findings as a follow up.

A simple method for finding Active Directory user information using C# with LDAP

I spent hours trying to find a simple way to get user data our of AD from an LDAP query. Turns out you don't need to do a lot of crazy stuff, and looking at my code when I was done, it turned out to be a lot easier than it seemed when I started out. The only thing I need to pass in to my function was the name of the property ( see the list here ), and the username. In my case it was coming from some other logic I had to write to get the users of a group that was a member of a SharePoint site. Also the ldapPath I pass in to the DirectorySearcher constructor was simply "LDAP://mydomain.com" This returns the value of the property of the user that you specify as a string. Example: getValidADProps("mail", "Ima User") will return the AD email address for Ima User. In the function, I used a try/catch in the instance that the property you are trying to find isn't there, you will get a index out of range error. I will say that this is not the more lightweig...

A cool way to use Properties in a SharePoint Web Part

Properties are nothing new in OOP, but something that I stumbled upon not too long ago was a cool thing that you could do with properties. My work was SharePoint web part related, but I imagine that it would work with any customized object that can be called in your page. I needed a way to reuse a webpart that was accessing a single User Profile field so that I could display any field I wished, as many as I wanted just by simply dropping a new custom web part on my page in SPD and simply adding a name/value pair to the HTML. The idea here is to build your web part with a property: public string CustomProperty {   get { return _CustomProperty; }   set { _CustomProperty= value; } } Nothing crazy here but later in the code we check the CustomProperty property for a value and if it's valid, we go and grab the field from the User Profile database and then display it in the web part: <WpNs0:ProfilePropertyPart runat="server...

Get users of AD group for use in SharePoint webpart.

Welcome to my first technical posting. My task here was simple, create a web part that displays the users of an Active Directory OU (Organizational Unit or group basically) which will have been added to a SharePoint site. This is our model internally going forward on how we are managing access to sites within our farm, so basically every site will only have one member... an AD group. This way we can manage (or let someone else manage) access through AD. I won't get into how to create a web part in this post ( you can start here if you like ), but more of the guts of what I used to get what I needed out of .NET in a web part. This is really basic to the rendered output is nothing fancy. Basically I got the site's userlist from the site context, iterated the user list, checked to see if the user was a group, if so, called code to give me the AD users of that group and output the user list. First add a reference to: System.DirectoryServices.AccountManagement; Here's the code: ...

Allow myself to introduce... myself.

Blogspot, here we go! Okay, so I have a MySpace page, facebook, friendster, twitter, Tumblr, and now a blogspot account. The reason for this new blog for me is that I never really had a place to put things about what I learn in my career anywhere. All that other stuff is fun and cool for keeping in the loop about all things viral and fun, but none of them are really places that I could put anything of substance. My goal for this blog is to mainly put things up here that I learn about my chosen profession of web development. I have been a professional developer for about 4 years now, so not too awful long considering I graduate 4 years ago fresh into the industry. I know some things, and not a lot about a lot more, but hopefully, I can help someone following in my footsteps find the answers, in layman's terms to some difficult, and maybe not so difficult programming and web development issues, most of which going forward will probably be about programming web parts in Share Point 20...