Posts Tagged ‘.NET’

ASP.NET MVC 3: Ajax Form with jQuery validate supporting (unobtrusive) Client Side Validation and Server Side Validation

Update 2011-08-07: I’ve written a new follow-up blog post to this one which shows how to upgrade the techniques described here with custom (jQuery) JavaScript code to implement a more flexible Ajax form handling. This blog post shows step by step instructions how to build an Ajax form with jQuery validate supporting (unobtrusive) client and […]

Read more…

ASP.NET MVC 3 & Unity 2.0: Using XML configuration for design-time configuration

Introduction In one of my blog post “ASP.NET MVC 3: Dependency injection with Unity 2.0” I explained how to use the Unity 2.0 dependency injection (DI) container in an ASP.NET MVC 3 web application. The example shown in this previous post uses run-time configuration to set up the DI container. A drawback of run-time configuration […]

Read more…

ASP.NET Membership Provider: Changing user password without knowing the old one

If you want to change a membership user’s password with the MembershipUser.ChangePassword method you need to know the user’s old password. The following extension method defines a SetNewPassword method that enables you to reset the password without knowing the old one: public static class MembershipUserExtension {   /// <summary> /// Set a new password for […]

Read more…

ASP.NET MVC3: Controller extension methods to render a partial view to string

To handle AJAX form requests in my ASP.NET MVC3 controller I needed a way to render a partial view to a string to return a JSON result containing both the (server-side) validation result (as boolean) and a rendered partial view (as string). Unfortunately in ASP.NET MVC3 there seems no out-of-the-box support for rendering partial views […]

Read more…

PDFsharp: Reading pdf documents created with Microsoft Report Viewer 2010

I’m using the .NET library PDFsharp to merge PDF documents created with Microsoft Report Viewer 2008 into a new PDF document. After upgrading the Microsoft Report Viewer and using the most recent version 2010 to create the individual PDF documents, the merged document contained only blank pages. It turned out, that PDFsharp is not able […]

Read more…