Subscribe to this list via RSS Blog posts tagged in Web
How Does Html.EnableClientValidation() Inject JavaScript? For a project I'm currently working on, I have a need to add some JavaScript at the end of a page in an ASP.NET MVC application. Since this is part of what Html.EnableClientValidation does, I thought that I would check out that source code to see if there was any kind of generalized mechanism for this. No such luck, I'm afraid. But I did learn a bit more about how Html.EnableClientValidation works, so I thought I might write that down in case it turned out to be useful someday. The Html.Enabl...

Posted by on in Blogs
grid.history Demo Fixed Apologies to those who tried my grid.history demo page Friday. In the course of updating the integration to support jqGrid 3.7.2 and simultaneously learning GitHub's pages feature, I killed the demo. It's fixed now, and I've added the ability to run the unit tests directly from that site, making it easier for me to test multiple browsers on the demo site, instead of just locally....
grid.history: A New, Free Integration for jqGrid and jQuery BBQ I recently finished an integration between the open source jqGrid and jQuery BBQ libraries. I have released my integration as open source, as well. As with both projects, it is dual-licensed under the MIT and GPL licenses. jqGrid is a JavaScript grid component with many useful features. I have previously explained how to use it with ASP.NET MVC. jQuery BBQ is a library which helps you manage proper functionality of the web browser's back and forward buttons by changing the fragment (hash) ...
grid.history: A New, Free Integration for jqGrid and jQuery BBQ I recently finished an integration between the open source jqGrid and jQuery BBQ libraries. I have released my integration as open source, as well. As with both projects, it is dual-licensed under the MIT and GPL licenses. jqGrid is a JavaScript grid component with many useful features. I have previously explained how to use it with ASP.NET MVC. jQuery BBQ is a library which helps you manage proper functionality of the web browser's back and forward buttons by changing the fragment (hash) ...
Replacing Controller.Session in ASP.NET MVC: Is This Wrong? Here's some code I wrote: public class MyBaseController : Controller { // ... public new ISession Session { get; private set; } // .... } ISession is an interface type I wrote which exposes everything I store in the session at runtime. I use constructor injection to assign this to a simple type which maps to the "real" Session during application runtime, and a "mock" session for unit testing. Session, in ASP.NET, is a user-specific cache. This hides Controller.Session (...

Posted by on in Blogs
Book Review: Rework Rework, by Jason Fried and David Heinemeier Hansson, cannot accurately be described as the "sequel" to the first book to come out of 37 Signals, Getting Real. As a significant percentage of the book seems to be word for word identical to text in Getting Real, I think it's more of a "remix." Getting Real focused on creating marketable web software, whereas Rework changes the focus ever so slightly to growing a business around marketable web software. If you've read Getting Real (you can sample...

Posted by on in Blogs
Stir Trek 2: Iron Man Edition Wrap Up Last Friday, I attended the Stir Trek conference here in Columbus. The day got off to an inauspicious start when I turned on my car. There was a high screaming noise, and acrid black smoke poured out from the engine. I opened the hood, pulled out a burning air-conditioner drive belt, and threw it into the bushes beside me. Now the engine ran fine! (Although, for some reason, this did not reassure my wife.) The conference is held in a local movie theater. After a day of technical sessions, the...
A Math Primer for Gentry's Fully Homomorphic Encryption A couple of weeks ago, I wrote What Is Homomorphic Encryption, and Why Should I Care? In that post, I promised to share my C# implementation of the algorithm from Craig Gentry's CACM article. Before I can do that, though, I need to explain some of the math involved. Perhaps surprisingly, it's actually very simple. (I say "surprisingly" because much of the math and technical papers on encryption is decidedly not simple, including that of Gentry's first fully homomorphic scheme, which was based...
Don't Depend Upon the ASP.NET Membership Tables One very popular option for implementing user security in ASP.NET is to use Forms Authentication with the SQL Server membership provider. This provider creates several database tables to store user-related information, as well as a number stored procedures. From time to time, a developer will attempt to add the ASP.NET Membership/Forms Authentication tables to their Entity Framework model (or LINQ to SQL, NHibernate, etc.) model. Before doing this, they will often have created referential con...

Posted by on in Blogs
jqGrid and XSS Security Version 3.5.2 of jqGrid included an important new feature: Now when autoencode is set to true we encode the data coming from server and not only when we post it (secutity fix) Prior to this, you were required to encode the data yourself. Now personally, I think that should be the default. But it would have been a breaking change for the grid, since there are a few cases where you want to display unencoded data (I'll discuss these exceptional cases in a second). It's really easy to make t...

Check out more tips and tricks in this development video: