Unit Testing ASP.NET User Controls
page 1 of 5
Published: 16 Aug 2007
This article demonstrates some of the challenges with ASP.NET user control customization, and how they can be tested in ASP.NET.
by Brian Mains
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 30015/ 59


I wrote in a past article about unit testing ASP.NET pages. It is also possible to work with user controls, with some additional considerations.  User controls inherit from System.Web.UI.UserControl class; however, it is possible to create an intermediate class, between the UserControl class and the ASP.NET user control (.ascx). This can perform more advanced capabilities and allow the user control to be unit tested, at least partially.

In addition, by crafting an application in a certain way, it can be possible to perform more advanced testing, such as the testing of dynamic table generation within the user control, of data binding to a data-bound control, or other features.

View Entire Article

User Comments

Title: mr   
Name: rob
Date: 2012-03-15 4:55:09 AM
would love a complete solution with usercontrol project and test projects for reference.

Product Spotlight
Product Spotlight 

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-05-22 6:52:47 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search