Microsoft’s ASP.NET MVC Lite, Building a TextReformatter With JsonResult

image.png

  Introduction   People often ask me if I use MVC or WebForms for my Microsoft ASP.NET projects.  I always tell them MVC, but I don’t use it in the classic way that most others do.  That is to say, I emit no html from my views, and for that matter really don’t even use views (with the exception of one view which is essentially my entire app.   People often refer to this as a SPA or Single-Page-Application. What this basically means is that my entire view is built with JavaScript (in my case Sencha’s ExtJS) and the only interaction with the server is to simply bring down Json results. In this post, I’m going to build a simple app following this principle. It’s purpose will be to take a big pile of … Continue Reading

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

image.png

Tomorrow night (Tuesday, August 23rd), we are having another meetup to talk about using MVC inside of Sencha’s JavaScript products.  I (Peter Kellner) will be talking for the first 20 minutes about how we are integrating the MVC pattern in our Silicon Valley Code Camp web site, then Ed Spencer from Sencha will follow on talking a lot more about MVC and best practices as well as Q&A Hope you can make it.  Details are here: http://www.meetup.com/The-San-Francisco-ExtJS-Meetup-Group/events/28760211/   … Continue Reading

DevConnections Presentation Orlando, How To Make Your Browser fly

(About 100 People) The Presentation was broken down into three parts.  Part 1 Created a windows razor project that cached in image on a web site using best practices for threading and locking.  The code and project to do this are below: var downloadByteArray = HttpContext.Current.Cache[cacheName] as byte[]; if (downloadByteArray == null) { // make sure multiple requestors are not filling up the cache lock (LockVal) { downloadByteArray = HttpContext.Current.Cache[cacheName] as byte[]; if (downloadByteArray == null) { Thread.Sleep(sleep * 1000); string imageLocation = HttpContext.Current.Server.MapPath("~") + imageUrl; downloadByteArray = … Continue Reading

MVC3 Unable To Return Large JSON Even with Web Config Patch, Using LargeJsonResult Instead

I’m trying to download a base64 encoded image that is about 4 Megabytes embedded inside a JSON object.  When I first tried this from my MVC3 Web application, I got the error: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property. … Continue Reading

Follow

Get every new post delivered to your Inbox

Join other followers: