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; } [...]
Archive for the ‘.NET’ Category
GroupBy Example with LINQ
Posted: April 7, 2012 in .NETTags: linkedin, LINQ, aggregation, collection
Custom master page error : "You must specify a value for this required field"
Posted: March 9, 2012 in .NET, SharePointReblogged 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 [...]
Missing Dataset List from Visual Studio Wizards
Posted: March 5, 2012 in .NETTags: .net, dataset, linkedin, visual, Visual Studio, wizard
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 [...]
RSS Aggregation in Umbraco 5 (Jupiter)
Posted: February 13, 2012 in .NET, CSHTML, MVC, UmbracoTags: CSHTML, Jupiter, linkedin, MVC3, Razor, Umbraco
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 [...]
Authenticated WCF service that returns JSONP
Posted: November 11, 2011 in .NETTags: JSONP, linkedin, WCF
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 [...]
Silverlight Html MVC Helper
Posted: September 11, 2011 in .NET, CSHTML, MVCTags: ASP.NET MVC Framework, linked, Microsoft Silverlight, MVC3
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). [...]
String extension that returns a default value when empty
Posted: June 12, 2011 in .NETTags: .NET Framework, Extension method, linkedin
.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 [...]
XNA Platformer Parralax Tutorial Problem
Posted: May 15, 2011 in .NET, XNATags: linkedin, Microsoft XNA, Video game development, Windows Phone 7
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() [...]