Archive for April, 2012

Converting an InfoPath Filler Form to a Web Based InfoPath Form

So, I’ve been working on an InfoPath form that was passed down to me and originally created as a Filler form. I finally completed it and needed to publish it, but there was a problem; its a filler form not a web based form. So, I had to reconfigure the form to work in a web browser and not try to launch in InfoPath filler.

The first step was to change the form to a Web Browser Form by going to the File tab > Form Options

InfoPath Options Menu

Next, you’ll want to go into the Compatibility section of the Form Options menu
Continue reading

Advertisements

SPMetal with Anonymous Access

So, I recently ran into a problem with using SPMetal with anonymous access. When Anonymous users access a web part that runs LINQ queries, they’ll get prompted for credentials in SharePoint 2010. The problem is actually related to the way the LINQ code works. It uses the default SPContext.Current to get the site objects. This becomes a problem when you need to run a piece of code with elevated permissions because without rebuilding the SPContext.Current, you’re still using the default permissions. With the default permissions, as an anonymous user, you will not have enough access to make calls using LINQ and as a result, you’ll be prompted to log in.

This blog had an okay solution:

Use the HttpContext object to force all SP objects to be created again. When this happens within the RunWithElevatedPrivileges method, the SPContext is recreated with this higher level of priveleges.

This code has its problems though.

Continue reading

SharePoint 2010 CSS Chart

I found a fantastic resource for someone who is branding SharePoint 2010 or implementing their own custom design.

It is a detailed chart on what CSS classes are used in SharePoint 2010, where they are used, and a graphic outlining the areas they effect. The author even includes the CSS tags that are used so you can easily copy & paste them into your Style Sheets.

I would recommend taking a look at this if you’re planning on stylizing SharePoint 2010. I wish I would have found it earlier!

Thanks go out to the SharePoint Experience for putting the list together.

http://sharepointexperience.com/csschart/csschart.html

CSS Only Menu

So, I recently decided I was tired of JavaScript and ASP.NET Menu controls. As a result, I challenged myself to create a CSS only menu provider. It was surprisingly easy.

First, I set up my parent and Child Menus like so:

 
Continue reading