New Article Series on ASP.NET 4.5 N-Layered Design Now Available for Purchase

Posted by: Imar Spaanjaars at Friday, June 28, 2013 2:45:40 PM in: Imar's Blogs

I am glad to announce the immediate availability of my new article series on N-Layered Design in ASP.NET 4.5!

Read on ...

ASP.NET N-Layered Applications - Introduction (Part 1)

Posted by: Imar Spaanjaars at Friday, June 28, 2013 2:42:40 PM in: ASP.NET 4.5

Note: this is part one in a series of ten. If you rather read this entire series off-line, you can buy the full series as a convenient PDF document that comes with the full source. Besides the convenience, buying the PDF will also make you feel good as it shows your appreciation for the articles and helps me pay the bills for my server and hosting so I can keep running imar.spaanjaars.com and continue to provide you with great content. For more details, check out this post that shows you how you can buy the entire series right now.

Now that the RTM versions of Visual Studio 2012 and .NET 4.5 have been out for a while, it seems like a good time to finally write the follow up to my popular series on N-Layered design using ASP.NET 3.5 that I wrote in 2008 and early 2009. I have been wanting to do this for a long time, but there were always other things on my Todo list with a higher priority. The wait has been worth it though; since the last series targeting .NET 3.5 that I published in late 2008 and early 2009, new and compelling technologies have been released that make writing an N-Layered application such as the Contact Manager a lot easier to write.

Read on ...

Book Review: Instant jQuery 2.0 Table Manipulation How-to by Charlie Griefer

Posted by: Imar Spaanjaars at Sunday, May 26, 2013 8:34:11 PM in: Book Reviews
Talks about the book Instant jQuery 2.0 Table Manipulation How-to by Charlie Griefer

I recently got the opportunity to review the book Instant jQuery 2.0 Table Manipulation How-to by Charlie Griefer. Being a fan and heavy user of jQuery, I happily accepted the offer.

Read on ...

Looking for Reviewers for my new Series on N-Layer Design with ASP.NET 4.5 and Entity Framework 5 Code First

Posted by: Imar Spaanjaars at Tuesday, April 23, 2013 8:03:57 PM in: Imar's Blogs

During the past couple of months, I've been hard at work writing a follow up of my article series on N-Layer design for ASP.NET. This was long overdue, as I completed the previous series in early 2009, more than four years ago!

Read on ...

Approving Users and Assigning them to Roles After They Sign Up for an Account

Posted by: Imar Spaanjaars at Sunday, November 11, 2012 2:38:47 PM in: ASP.NET 4.5
Back in July I wrote an article that showed how you can require your users to confirm their e-mail addresses before they can access your site after signing up for a new account. In this article I describe a similar but slightly different technique where an administrator of the site can approve the account before the user gains access to the site.
Read on ...

Letting Users Manage Their Own Data using ASP.NET 4.5 Web Forms

Posted by: Imar Spaanjaars at Saturday, November 10, 2012 3:30:38 PM in: ASP.NET 4.5

A question that comes up often on forums such as p2p.wrox.com is how to let users manage their own data stored in a database. Probably the easiest way to accomplish this is to keep the user name in a separate column. Then when you query the data, you add a WHERE clause that retrieves only those rows that matches the user's name. Likewise, when inserting data, you store the user name along with that data.

But how do you capture the user's name? In the remainder of this article you see a two different ways to retrieve the user name of the currently logged in user.

Read on ...

Implementing View State properties

Posted by: Imar Spaanjaars at Sunday, July 29, 2012 2:04:03 PM in: ASP.NET 4

By design HTTP, the protocol used to request and deliver web pages, is stateless. What that means is that the server does not keep track of requests you made to the browser. As far as the server is concerned, each request for a page is an entirely new one and is not related to any previous request you may have made.

This of course causes issues if you need to maintain data for a specific user. To overcome these problems, web developers have a number of solutions available, including session state, cookies and hidden form fields. ASP.NET Web Forms has been hiding much of this complexity by implementing a concept called View State. Controls (including the Page class itself) can read from and write to the View State collection to maintain data across postbacks. Controls such as Label use this mechanism to send their values to and from the browser, maintaining them across postbacks.

In this article you'll see how to leverage View State to store your own values as well.

Read on ...

Requiring Users to Confirm their E-mail Address after they Create an Account

Posted by: Imar Spaanjaars at Wednesday, July 18, 2012 12:04:02 PM in: ASP.NET 4.5

Over the past couple of weeks I received a number of e-mails from readers with more or less the same question: how do you require users to confirm their e-mail addresses before they are allowed to log in with an account they just created. Rather than answer them individually by e-mail, I decided to write this article to explain the principles.

Read on ...

Uploading Multiple Files at Once using ASP.NET 4.5

Posted by: Imar Spaanjaars at Sunday, April 08, 2012 9:14:56 AM in: ASP.NET 4.5
In versions of ASP.NET before 4.5 there was no direct way to enable a user to upload multiple files at once. The FileUpload control only supported a single file at the time. Common solutions to uploading multiple files were to use a server-side control such as those from Telerik or DevExpress or to use a client-side solution using a jQuery plugin for example. In the latter case, you would access Request.Files to get at the uploaded files, rather than retrieving them form a FileUpload control directly. Fortunately, in ASP.NET 4.5 uploading multiple files is now really easy.
Read on ...

Modifying the CreateUserWizard Control

Posted by: Imar Spaanjaars at Saturday, January 14, 2012 2:57:54 PM in: ASP.NET 4

The CreateUserWizard control in ASP.NET makes it super easy for your users to sign up for an account. Simply add it to a page, configure it, and you're good to go. In addition, you can control the way it behaves using settings in the web.config file (such as whether or not duplicate e-mails are OK, password lengths and strength, whether or not you want to implement a "security question and answer" and so on). Also, when you don't like its appearance, you can customize the wizard's steps which expands its underlying HTML into your page, so you get full control over the rendering.

However, when you customize the steps, you'll find that the config setting that controls the display of the "security question and answer" no longer works as expected. In this article you see how to set up your control so it still takes the config settings into account.

Read on ... 12345678910111213141516171819202122232425262728293031