ASP.NET News from Blogger: peterkellner.net   Get the feed of: peterkellner.net

Total News: 291

Deeply Nested Null Checking in C# verses Assert with no nesting

One of the code smells that particularly bothers me (thought I often find myself doing it anyhow) is when I defensively program against nulls in C# (though could be any other language).  That is, I do...

Leading BOF Session on Building SenchaTouch 2.0 App Coming to Mountain View May 25, 2012

Im leading a 3 hour hands on lab titled "MindSource Birds of a Feather 55 (BoF) – Developing Mobile Applications using SenchaTouch 2.0" on May 23rd in Mountain View California.  This is our first go...

How To Add Paging With a Filter Using Sencha Architect with ExtJS4

Sometimes,the simplest things can seem complicated.  Well, in this case, after struggling for a while, it turns out the simplest things can actually be pretty simple.  The application Im building righ...

Microsofts ASP.NET MVC Lite, Building a TextReformatter With JsonResult

Introduction People often ask me if I use MVC or WebForms for my Microsoft ASP.NET projects.  I always tell them MVC, but I dont use it in the classic way that most others do.  That is to say, I emit ...

Entity Framework CodeFirst Important Tip For SQL Execution Efficiency

Introduction Ive now been using Microsofts Entity Framework CodeFirst for a month or two and am very impressed with how easily it is to access data in a type safe way.  I also have noticed that I need...

Building a Simple Window Service Application in Visual Studio 2010 That Runs, Sleeps and Stops

IntroductionThe goal is to create a simple Service in Windows 7 (or other similar OSs) with Visual Studio 2010 that simply starts, sleeps for 15 seconds, then stops.  I realize this is not that useful...

Presenting In San Francisco 3/21/2012 (Wednesday): First Blood With Windows 8 Metro Programming in JavaScript and HTML5/CSS3

http://baynetug.org/DesktopModules/DetailXEvents.aspx?ItemID=520&mid=49Microsoft San Francisco Office 835 Market Street, Suite 700 San Francisco, CA 94103Wednesday, March 21st, 6:30 PM to 9:0...

How To Setup Your Own Pop3/IMAP Email Server for Local Development Testing

For the past few months, Ive been working on building an HTML5 email web client.  Its fundamentally server based for gathering email.  That means, when I test, I need to connect my server software to ...

Developing With Visual Studio 2011 and the Windows 8 Consumer Build With Metro and Two (multiple) Monitors

Wow, thats a long title. Sorry, but I just wanted to be clear what you are getting if you come here.  Do, in this article, Im going to talk about what it takes in very simple terms to build and s...

Phone Race For $100 at Windows Store With MVP John from Columbia

  The Contest Post a picture to facebook with your phone faster than RichartT (with not twitter account) with his windows phone at the Microsoft Store.     The Players John (not...

Microsoft MVP Summit, GeekGive! (3rd year for me)

For the past two years, a day before the Microsoft MVP Summit a GeekGive has been organized where about 50 or so of us all go to some location and help with community building activities. Three years ...

EntityFramework CodeFirst 4.3, Adding Data Migration To Simple Example (Part 2)

  Introduction This three part series demonstrates a very simple example of using Entity Framework Code First (Version 4.3) to create a SqlServer Table and populate it with data (that is part 1...

EntityFramework Code First 4.3, Adding a Single Default Column to a Migration Enabled Project, Part 3

  Introduction This three part series demonstrates a very simple example of using Entity Framework Code First (Version 4.3) to create a SqlServer Table and populate it with data (that is part 1...

EntityFramework 4.3 CodeFirst Trivial One File Example Part 1

  Introduction This three part series demonstrates a very simple example of using Entity Framework Code First (Version 4.3) to create a SqlServer Table and populate it with data (that is part 1...

LINQ To SQL Performance Getting Huge Improvement in EF5, Microsoft Does Listen!

  The Original Problem Back in 2009, I discovered what I considered a fatal flaw in performance using LINQ2SQL with LINQ queries.  I published 2 very popular articles on this as well as...

HTML5 Media Queries, Tablet Verses Phone, Anything but Intuitive

    Background and Introduction Im building a mobile touch application that uses SenchaTouch 2 on the client and Microsofts ASP.NET EF Code First on the server.  Things have been mov...

PC verses MAC (let the debate continue)

  So, I know its hard to believe, but I am actually considering getting a Macbook to use as my main development computer.  The reason is Im using some beta mobile development tools that onl...

EntityFramework CodeFirst and AutoKey Generation

  This one had me a little stumped, and as usual, there are not enough examples in the Microsoft documentation to be very helpful. Im using EntityFramework CodeFirst with Visual Studio 2011....

When Using EF CodeFirst With Visual Studio, How to Live With Cannot drop database because it is in use error.

Problem So, if you have been doing development with Visual Studio 2010, Entity Framework CodeFirst, SqlServer or SqlServerCE for any amount of time, youll quickly run into the problem that the datab...

Debugging in Visual Studio 2011 Preview / WinRT Metro JavaScript With Live Watch Variables Pinned to the background

Yes, this is JavaScript Im debugging in Visual Studio 2011 Pre Release.  Just like c# and vb!  A picture is worth hundreds of words, so, here is the picture (and of course the words will fol...

With Windows 8 Metro HTML5/CSS3/JavaScript/WinRT, Read Any File From Project Directory

One of the standard things we programmers do is to read static files from our project directory.  That is, say you put a json file such as /data/peter.json at the root of your Visual Studio 2011 ...

Building A Windows 8 Metro Style JavaScript / HTML5 / CSS3 App Using ListView

  Background The new Windows 8 Developer environment is seriously under documented at this point in its product life.  Microsoft released a Developer Preview at the Build Conference in Sep...

Testing Help From the Twitter Sphere, Anyone have an IPad1 Handy?

Ive been working on an HTML5/CSS3 SenchaTouch project for many months now and near the end we our finding that we have problems on an IPad1 only and all I have is an IPad2. My 700+ twitter buddies to...

I Love the Validation Error Messages I Get From EntityFramework CodeFirst 4.1!

Ive been using EntityFrameworks CodeFirst 4.1 on a new project Ive been working.  I plan to blog quite  bit about it, but in the mean time I just felt the need to share.  Ive got some f...

Gingerbread Update for my Verizon Samsung DROID Charge

Yesterday, I turned my Samsung DROID CHARGE 4G from Verizon on and it asked me if I wanted to update.  Always wanting that, I said yes.  After two days, here are the nice things Ive found......

Using The DataContext In EntityFramework To Retrieve Nested Objects

Im always somewhat amazed when I read something from documentation that is not straight forward and it actually works.  So amazed and excited that I often feel the need to blog about it. So,... ...

How to Format HTML with Windows Live Writer

Ever since Microsoft released Windows Live Writer, posting articles to this blog (and others) has been really easy.  Even though this blog is powered by WordPress, Microsofts Live Writer lets... ...

New Google Analytics Real Time Statistics Pretty Amazing!

  I just noticed that in the beta of Google Analytics, you can now see real time statistics of what is going on for a web site.  As a numbers junky, this is totally awesome!  I just......

With Visual Studio 2010 (and vs2011 preview) Fast Launch Not Helpful Often

  Lets say Ive created two Visual Studio Projects with the same name WebApp but reside in different directories as shown below (c:\temp\Proj1 and c:\temp\Proj2).  I often call the... This ...

Entity Frameworks CodeFirst Automatically Generates Foreign Keys For you

Ive been struggling with getting the EF CodeFirst right so that it automatically generates foreign keys when the tables are created. I had noticed that there is interesting syntax you can put in to......

Our First Windows 8 Metro JavaScript Meetup Tonight

  Today we had our first meetup of the Windows 8 Metro JavaScript Group. http://www.meetup.com/The-Silicon-Valley-Windows-8-Metro-Development-in-JavaScript/ We had about 10 people in all at......

Building an Senchas ExtJS 4.0 MVC Application With Microsofts ASP.NET MVC3 Series / Basics

Part 1 Basics Part 2 Enhanced (coming) [...] This site is a resource for asp.net web programming. It has examples by Peter Kellner of techniques for high performan...

Windows 7 Trick for Docking Application to Side of Screen

I think everyone but me knows this, but just in case, I thought Id blog it. Im currently sitting in the Sprint Developer Conference and dont have my multi-monitor setup.  what I want to do... T...

Need To Get Static JSON File with POST verb on IIS 7.5?

Normally, when we stick a JSON file up on an IIS web server, all we have to do to get to is is to set the Mime type.  One easy way to do it is to add to your web.config the following:   ....

Making Outlook 2010 Forget Cached Names in the To: CC: BCC fields

Do you ever find that after you have changed some ones name in your email, you keep getting the old address popping up in the two field?  Ive had friends tell me 10x to stop sending to an... Thi...

Microsoft To Add Auto-Compiled LINQ Queries to Entity Framework V.Next!

  In May of 2009 I discovered some significant performance problems that I blogged about.  In summary, I had tracked it down to the issue of LINQ2SQ having to create a full expression tree....

How To Safely Display Data From ASP.NET TextField Inputs

Lets say you have a user input field that you want the user to type data into which will be later displayed back to the user.  You dont want the user putting in their own html or other things... ...

An Interesting Attack Vector On Silicon Valley Code Camp Web Site

I often look at the Pages Not Indexed report from web sites I manage and today I noticed a couple interesting ones.  People are going after where source control might be and looking for readme......

Tip for Using SQLServer To Count By Alpha Names in a list

  So, this is not a big tip, but worth at least 10 minutes to figure it out on your own.  Here is to saving you 10 minutes:   SELECT LEFT (userlastname, 1) as alpha, ... Thi...

Silicon Valley Code Camp V6, 2011, is Just 4 Days Away!

  As the primary organizer for Silicon Valley Code Camp, Im very excited to say things are really going well for this year.  Our attendance looks to be setting yet another record (we are......

Microsoft ASP.NET presentations at Silicon Valley Code Camp on 10/8 and 10/9

  SV Code Camp is happening next weekend with well over 200 sessions.  The conference is really technology agnostic and try hard to keep it that way, but I am an ASP.NET guy these days so.....

Boost Your SEO And Promote Silicon Valley Code Camp At The Same Time!

Introduction We have new page on the under the // ABOUT menu on the Silicon Valley Code Camp web site. Its called Live Referral Links and essentially, its real time tracking of referral... This si...

Silicon Valley Code Camp Login Failing with IE10 (Fixed Now)

  Scott Hanselman posted a while back about a browsers definition problem with some ASP.NET sites that causes problems.  Microsoft has articles on this also.  Having just received my.....

WinRT in Windows 8 CLR Confusion

Im here at the Microsoft BUILD conference in Anaheim and am very much enjoying all the announcements surrouding the next major release of Windows (at least a year or two out).  One of the big... ...

A Quick Tip On How To Ignore Time When Querying From SqlServer

Seems like this comes up a lot so I thought Id blog about a clean way I found to do this from a StackOverflow article.  Basically, the problem is if you have a bunch of Sql records that have... ...

Using ASP.NET Web Forms, Passing Primary Key to RowCommand Event

  I know this is old hat, but after recently having a conversation with one of the ASP.NET Team guys about how easy Web Forms is to use, I thought Id just post a simple example of that. ......

My First Experience With SqlServer CE 4.0

I have heard all the hype about how great Sql Server CE 4.0 and that it is now standard with Visual Studio 2010 SP1.     Ive got a small project (1 table) that Id like to include in... ...

Getting ExtJS 4 Date Format To Behave Properly in Grid Panel with ASP.NET MVC3

  Introduction and Problem Converting Data Formats back and forth between browser and back end servers can be a little confusing.  In my case, I have a simple Sencha ExtJS 4.0 form......

Meetup At Sencha Headquarters Tomorrow (Tuesday 8/23) in Redwood City Talking MVC in JavaScript!

Tomorrow night (Tuesday, August 23rd), we are having another meetup to talk about using MVC inside of Senchas JavaScript products.  I (Peter Kellner) will be talking for the first 20 minutes... ...

Connecting To SqlServer From Web.Config Without a Password (Trusted Connection)

I often forget that the simplest way (IMHO) to connect to a Microsoft SqlServer 2008 database is to use the web.config connection for making a Trusted connection.  Basically, it keeps you from......

View Other bloggers