Archive for the ‘.NET’ Category

Here is an example of aggregation using LINQ to a collection -   using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace GroupByExampleLinq { public class Person { public string FirstName { get; set; } public string LastName { get; set; } public string Email { get; set; } public string AccountNumber { get; set; } [...]

Reblogged from W0ut SharePoint and .NET: When using a custom master page and editing a page in SharePoint 2010 I received a dialog box the following error: “You must specify a value for this required field”. This error is caused when you set the contentplaceholder ‘PlaceHolderPageTitleInTitleArea’ to: Visible=”False”. After removing the Visible=False attribute from the [...]

I have recently seen an issue that popped up in a couple different projects I have worked on. When using a wizard inside Visual Studio, the available datasets list has been empty. I was able to solve this once after exhausting other build/rebuild techniques by creating a new project, then copying all the source files from the [...]

I’m using the first Umbraco 5 (Jupiter) RTM on a new project. One of the requirements of this project is to aggregate RSS feeds, so I built a simple plugin leveraging the System.Xml.Linq objects. To make the plugin, I created a new MVC 3 project in visual studio to build and test the functionality. I would [...]

I just picked up a GHI Panda II for some development with the .NET Micro Framework. Very excited about tinkering in the embedded world.

Today I was challenged with creating an authenticated, cross-domain, WCF service that returns JSONP.  Using the ‘out of the box’ WCF configurations this is not possible.  If you attempt to use authentication with an endpoint that allows cross-site scripting, you will recieve an error message like this – Cross domain javascript callback is not supported in [...]

One of the great MVC3 benefits is how easy it is to create helpers to inject HTML into your views. After reading this post, I decided I would use Bart Czernicki’s example to create an MVC3 helper ‘cshtml razor engine style’. You can place the following code in your App_Code folder (in a cshtml file). [...]

.NET extension methods are very useful. Here is one that I am using frequently in a current project – I want to trim a string of extra spaces at the ends, then check to see if it is empty. If it is empty I want to assign a default value. With .NET extension methods, it [...]

While following the scrolling tutorial for the XNA Platformer Starter Kit (3.1), I ran into an issue with the Level.Draw() method. This problem only occurs if you are using XNA 4.0 or higher with the tutorial. In the tutorial (http://msdn.microsoft.com/en-us/library/dd254919(v=xnagamestudio.31).aspx) it has the line – spriteBatch.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.Immediate, SaveStateMode.None, cameraTransform); But this fails, as the SpriteBatch.Begin() [...]

I was getting this error today when trying to use the designer view of a Windows Form with the visio active x control. I would imagine this same error could occur for any COM call. Warning 45 Unspecified error (Exception from HRESULT: 0×80004005 (E_FAIL)) Or you may see an error like – Error HRESULT E_FAIL has been [...]