Small LINQ Trick for Converting List<String> to String Text List
Wednesday 24 February 2010 @ 2:58 pm
  Here is a shorthand way for converting a list of strings defined as follows: List<string> strings = new List<string> [...]
Comments (3) - Posted in C#, LINQ  


Authentication and Authorization Using RIA Services (Article 7 of 7)
Monday 25 January 2010 @ 4:25 pm
      Title Of Each Article Video Included With Each Post [...]

Adding A Sessions Page That Includes a Query Parameter In Silverlight VS2010 Beta2 (Article 6 of 7)
Monday 25 January 2010 @ 4:22 pm
    Title Of Each Article Video Included With Each Post Part 1 Introduction To RIA Services In Silverlight (This Article) 7 Minutes Part 2 Basic RIA Services And DataGrid With  VS 2010 Tooling 14 Minutes Part 3 Adding A DataGrid With Connect The Dots DataBinding in VS [...]

Adding Speakers Page Template With Converters In Visual Studio 2010 Beta2 (Article 5 of 7)
Monday 25 January 2010 @ 4:20 pm
      Title Of Each Article Video Included With Each Post Part 1 Introduction To RIA Services In Silverlight (This Article) 7 Minutes Part 2 Basic RIA Services And DataGrid With  VS 2010 Tooling 14 Minutes Part 3 Adding A DataGrid With Connect The Dots DataBinding in VS [...]

Basic RIA Services And DataGrid With VS 2010 Tooling (Article 2 of 7)
Monday 25 January 2010 @ 3:51 pm
  Title Of Each Article Video Included With Each Post Part 1 Introduction To RIA Services In Silverlight (This Article) 7 Minutes Part 2 Basic RIA Services And DataGrid With  VS 2010 Tooling 14 Minutes Part [...]

How To Convert From Request With Parameter to No Parameter in ASP.NET (Server.Transfer)
Sunday 24 January 2010 @ 2:59 pm
  The problem is that I’m trying to keep track of the exact URL a person selects including the request parameter.  That is, I have a URLs that can be played as follows: http://video.peterkellner.net/TestPage.html?src=P1_Intro.wmv http://video.peterkellner.net/TestPage.html?src=P2_BasicRIANoTooling.wmv   I’ve actually got 7 videos that I want people to be able to play.  [...]
Comments (3) - Posted in C#, IIS7  


Adding A DataGrid With Connect The Dots DataBinding in VS 2010 (Article 3 of 7)
Saturday 23 January 2010 @ 12:41 pm
      Title Of Each Article Video Included With Each Post Part 1 Introduction To RIA Services In Silverlight (This Article) 7 Minutes Part 2 Basic RIA Services And DataGrid With  VS 2010 Tooling 14 Minutes Part 3 Adding A DataGrid With Connect The Dots DataBinding in VS [...]

Introduction To Using RIA Services In Silverlight (Article 1 of 7)
Wednesday 20 January 2010 @ 12:12 pm
  This series of video presentations goes through the process of building a Speaker and Sessions Viewer for Silicon Valley Code Camp’s data using PDC09 presentation here and am very thankful for the help.  I’m personally very excited about the opportunities Silverlight 4.0, RIA Services, I’m back and very excited.  [...]

Another Cool Resharper Refactoring
Saturday 19 December 2009 @ 6:52 pm
  So, if you are like me, it’s easy to make mistakes on whether to use && or || when combining variables on if statements.  I hate to just start nesting if statements because the code gets bulky, but if not, I have to think three times about whether I got it right. [...]
Comments (1) - Posted in C#, ReSharper  


Combining JavaScript and CSS to Make Pages Load Faster
Tuesday 10 November 2009 @ 1:26 pm
  We are in the process of “speeding up” our http://atashbahar.com/post/Combine-minify-compress-JavaScript-files-to-load-ASPNET-pages-faster.aspx and it’s working well for us.  This project does a nice job of calling a minifier, gzipping and caching. Hoe this helps!
Comments (1) - Posted in C#, JavaScript  


Converting From System.Data.Linq.Binary to String and Back
Sunday 8 November 2009 @ 10:49 am
  Just a quick post in case anyone is wasting 10 minutes figuring out how to do this.  For me, this came up because in encoding) So, in my C# code, here is what you need to convert to the Linq.Binary:Linq.Binary carrierMatrix = new ASCIIEncoding().GetBytes(myString);And, to go back from Linq.Binary:string carrierMatrixString = [...]
Comments (1) - Posted in C#, LINQ, LINQ to SQL  


I Love FinalBuilder from VSoft Technologies!
Monday 2 November 2009 @ 5:47 pm
  For the past couple years, I’ve used a product called FinalBuilder from subversion into that directory All My Visual Studio Solutions are built All the config files (web.config,app.config, etc.) are updated with appropriate parameters (connection strings, etc.) The Web Site is copied to the [...]

At PDC09 Windows Bootcamp (Monday 11/16) Doing Table Top Demos of ASP.NET Dynamic Data
Monday 26 October 2009 @ 11:33 am
  Microsoft’s big developer conference (PDC Dynamic Data Feature built into asp.net.  Basically, what Dynamic Data gives you in a nut shell is the ability to easily make web apps easier for showing all kind of different data types. For example, if you happen to have a picture stored with each user’s profile, [...]

To Brace or not to Brace in C# ifs and other Constructs
Monday 19 October 2009 @ 8:24 am
  In my last post, I found a use for inverting if statements.  That is, I postulated that it is better to have an explicit else when it’s impossible for that code to be executed.  The argument for just falling through the loop with no else is that why have unnecessary code.  [...]
Comments (11) - Posted in Best Practices, C#  


Using ReSharper, I’ve Always Wondered Why They Had the “Invert if” refactor
Sunday 18 October 2009 @ 8:33 am
  Well, now I know.  Here is an example of some code I just wrote: if (doDeficitCalc) { throw new ApplicationException("Need to implement deficit weight rating"); } else { [...]
Comments (8) - Posted in C#, ReSharper, Refactor  


Awesome Scrum Developer Training coming to Silicon Valley Microsoft Campus
Wednesday 14 October 2009 @ 9:02 pm
  Several years ago, I was invited to a special showing of what was going to be the new SqlServer 2008 database in San Francisco.  I had expected a sales demo but was hugely surprised by the quality of the presenter and his deep understanding of issues facing real developers like us.  Over the [...]

Using LINQ to Convert an Array Into a Generic List with C#
Wednesday 14 October 2009 @ 5:35 pm
  This is just going to be a short post, but I bet it’s something I do a large number of times so I thought I’d blog it.  Say you get back from something like a web service an array of objects. In my case this:cmRateResult[] cmRateResults = TransiteUtils.MakeRateRequest(_cmRateRequest); .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, “Courier [...]
Comments (5) - Posted in ASP.NET 3.5, C#, LINQ  


LINQPad Help For Creating Nasty Group by Query in Native SQL
Monday 28 September 2009 @ 9:51 am
  I often speak very highly of Group By,
Comments (1) - Posted in C#, LINQ, LINQ to SQL, TSQL  


Using LINQ2SQL, Use Group By To Get List of Top Occuring Values
Thursday 3 September 2009 @ 4:05 pm
  So, I’m really enjoying using LINQ and specifically
Comments (0) - Posted in C#, LINQ, LINQ to SQL  


In ASP.NET, How To Create a DropDownList from an ENUM
Tuesday 16 June 2009 @ 4:05 pm
  So, you have an enum defined as follows: public enum CompanyAddressType { Unknown = 0, Primary = 1, Warehouse = 2, [...]

Next Page