Twitter












C#

Updating Partial Views with Unobtrusive AJAX in MVC 3

This blog has been relocated to http://blachniet.com. See this post at it's new home: http://blachniet.com/2011/0... is post is meant to be a more straightforward overview of my previous post. The previous post got a little long and turned into a walthrough. If you need a walkthrough of this, check out that post at http://geekswithblogs.net/b... So in my new exploration ......

[Walkthrough] Updating Partial Views with Unobtrusive AJAX in MVC 3

After writing this post, I realized that it is obnoxiously long, and maybe includes a little bit too much hand-holding. Nevertheless, I decided to post this very detailed step-by-step walkthrough of implementing a simple AJAX form in MVC3 with Razor. I'm probably going also post a shortened version of this topic for those that don't need a complete walkthrogh. So I've been attempting to dive into ASP.NET MVC 3 lately, and have hit plenty of bumps along the way. This is my first encounter with any ......

MemoryStream.ToArray() VS MemoryStream.GetBuffer()

From MSDN (http://msdn.microsoft.com/... Note that the buffer contains allocated bytes which might be unused. For example, if the string "test" is written into the MemoryStream object, the length of the buffer returned from GetBuffer is 256, not 4, with 252 bytes unused. To obtain only the data in the buffer, use the ToArray method; however, ToArray creates a copy of the data in memory ......

C# DateTime Precision

I ran across a problem recently sorting objects by a DateTime property. The problem was that the DateTime structure object in C# is actually only precise to about 16 milliseconds on most machines, and my stored times were much closer together than that. Here's a good article with more information http://csharpfeeds.com/post/13441/Precision_and_accuracy_of_DateTime.aspx.