How To User StreamReader to Open A File ReadOnly in C# (.NET)
Monday 7 December 2009 @ 6:14 pm
  This is probably something pretty simple, hardly worth blogging about, but it took me a little while (15 minutes)  to figure out how to open a file C#. Say you have a block of code like the following for simply reading all lines of a file: StreamReader streamReader = new StreamReader("myfile.txt") string [...]
Comments (3) - Posted in ASP.NET 3.5  


Fun Times at “Ask the Experts” table at PDC09 Today
Monday 16 November 2009 @ 3:56 pm
  One of the fun parts of being an MVP is that occasionally we get asked to help at Microsoft events and answer questions around topics that are just fun to talk about regardless (and usually includes a free lunch).  Today, I was sitting at the ASP.NET Dynamic Data table.  We probably had about [...]

How To View JSON in a Pretty Way
Friday 6 November 2009 @ 9:49 am
  Cutting to the chase, I choose ExtJS which gives us high quality “forms like” user interactions and MVC for getting the data.  That is, the Application looks like this: The data retrieval URL used by the JavaScript look like: bing or http://www.bodurov.com/JsonFormatter/ ) (more information at:
Comments (1) - Posted in JSON, JavaScript, MVC  


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, [...]

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  


How to Disable Edit/Insert/New Buttons in DetailsView or GridView (ASP.NET 2.0+)
Sunday 6 September 2009 @ 5:27 pm
  So, this is kind of embarrassing, that it took me a while to figure this out.  I have not been doing pure asp.net server control programming for a while, but I figure since it took me a while, maybe there is someone else in the same boat. So, you have a GridView [...]

Bravo for ORCSWeb! On so many fronts
Monday 27 July 2009 @ 12:59 pm
  Many of you know of http://www.siliconvalley-codecamp.com Please figure out why SqlServer 2008 is not letting me access catalog MyStuff1 from user 3p1 and fix Please make a replicate of website MyWeb1.com including the sqlserver catalog’s and put it on MyWeb2.com on server .149 Please [...]

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, [...]

My Two Presentations Today at VSLive in Las Vegas (ExtJS, Then High Performance ASP.NET Web Sites)
Monday 8 June 2009 @ 10:41 pm
  Today was my first time doing 2 presentations during the same day at a professional conference (

My ExtJS Presentation at Microsoft’s Office in San Francisco Last Night
Thursday 21 May 2009 @ 12:07 pm
  Last night, I gave a 90 minute presentation on how to use ExtJS with ASP.NET serving up the data at the Bay.Net locally lead by Kim Greenlee for sponsoring the event, Thanks to ExtJS for giving a free developer license.

LINQ To SQL Very Slow Performance Without Compile (CompileQuery)
Wednesday 6 May 2009 @ 10:23 am

In this article, it is shown how important it can be to use the CompileQuery class when using LINQ to SQL. Doing a simple query in LINQ to SQL verses ADO.NET is shown to run 37 times slower without taking advantage of the Compile feature in LINQ to SQL. If you are doing the same query over and over in LINQ to SQL, this is a no brainer. I’m surprised I did not know this myself previously.

Performance of LINQ to SQL compiled verses not and ADO.NET

How to Set JavaScript Programmatically on a Page in ASP.NET with Parameters
Sunday 3 May 2009 @ 4:42 pm
  Programmatically setting ExtJS project that requires me to show some details on a page that I want to show with

Speaking Wednesday May 20th, 6:30PM, Microsoft Office San Francisco on ExtJS and ASP.NET Membership!
Monday 20 April 2009 @ 9:59 pm
  Come hear about how to see Microsoft Office at a meeting of ExtJS JavaScript Interface When:  Wednesday, 5/20/2009 at 6:30 PM Where:  Microsoft Office, 835 Market Street, Suite 700, San Francisco Event Description In this session, we will demonstrate building a super rich JavaScript interface [...]

Not Using Session in ASP.NET means Session Affinity/Sticky Sessions Not Necessary in Web Farms!
Friday 3 April 2009 @ 9:51 pm
  So, I’ve always incorrectly thought that somehow, the cookie stored in Stefan Schackow, a Microsoft employee who is an expert on all things secure around

A Great Telerik Training Coming Up in Capitola, CA 4/13-4/15
Friday 3 April 2009 @ 9:41 pm
  Telerik’s best partners.  I hope you can make it! For more information, check out the link here:

Multi Level ASP.NET Menu with CSS Friendly Control Adapters (The Source Code!) Part 6
Friday 27 March 2009 @ 12:40 pm
  I always intended to put the source code for this project online, however I just kept not getting around to it.  In this article, I’m attaching a Visual Studio 2008 Solution that includes both the modified CSS Friendly Control Adapter as well as a sample application that demonstrates the technique in this series.  [...]

ASP.NET 3.5 Social Networking by Andrew Siemer (Book Review)
Wednesday 25 March 2009 @ 2:04 pm
  Structure Map (IOC) Error Handling Social Network Schema Designs (Friends and Groups) Messaging Data Layers (

How To Access Content From MasterPage in ASP.NET
Friday 20 March 2009 @ 9:41 am
  So, you want to access some content from inside a page that you created from an existing

How to Retrieve a GridView Based on a CheckBoxList of Items with Asp.Net using ObjectDataSource with a little LINQ Thrown In
Sunday 7 December 2008 @ 1:08 am
So, the problem is you have a list that you want to retrieve from that contains multiple values.  Say for example, you have a list of 5 cities and you want to retrieve a list of people in some combination of those cities.  If you use the class SelectValue method with ControlParameter in

How To Tell If Ajax is working on your site with ASP.NET’s ajax UpdatePanel and other Controls
Sunday 12 October 2008 @ 8:36 pm
So, I suppose you should just be able to see the fact that Fiddler, or you can do the cheap trip about I’m about to explain. Simply, add a sleep statement to your page_load event (Thread.Sleep(3000);) and run your page.  If you are using

Next Page