Troubleshooting Website Problems by Examining the HTTP Traffic
I started my career as a web developer with Microsoft's Active Server Pages (ASP), the predecessor to ASP.NET. ASP was a very simple scripting engine
and lacked the tools that ASP.NET developers today take for granted, most notably a debugger. Debugging an ASP script typically involved littering......
Improving Web Development Using Virtualization
Most web developers have a particular development environment on their computer. They may have the .NET Framework version 3.5 and Visual Studio 2008
installed, along with Microsoft SQL Server 2005, Internet Explorer 7 and Firefox 3. In a perfect world this environment would be static and the
de......
New Date Data Types in Microsoft SQL Server 2008
In August 2008 Microsoft released
the latest version of the database server software, SQL Server 2008. SQL
Server 2008 includes a number of new features not found in SQL Server 2005, including: a terser T-SQL syntax; the new
MERGE statement; new data types and functions; enhanced encryption
......
Building Interactive User Interfaces with Microsoft ASP.NET AJAX: Enabling Bookmarking and the Browser's Back Button
AJAX applications offer a more interactive user experience by replacing traditional full page postbacks with leaner and more efficient partial page postbacks.
These partial page postbacks are executed asynchronously using JavaScript code in the browser. When a web surfer clicks on a link or subm......
Retrieving the Just-Inserted ID of an IDENTITY Column Using a SqlDataSource Control
ASP.NET offers a variety of tools and mechanisms for working with database data, including a number of data source controls, such as the SqlDataSource,
ObjectDataSource, and LinqDataSource, among others. The SqlDataSource is one of the most basic data source controls as it operates directly agai......
Programmatically Retrieving a Stored Procedure's Parameters
Stored procedures in SQL Server are similar to methods in C# and Visual Basic code.
They encapsulate one or more statements into a single, parameterized construct. Both stored procedures and methods are a form of code reuse and
their use help developers adhere to the DRY principle (Don't Repeat
......
Using ASP.NET 3.5's ListView and DataPager Controls: Grouping By a Data Field
The ListView control renders its ItemTemplate once for every item in its DataSource. As discussed in
Grouping Data with the ListView Control it is possible to inject grouping template
every N records. This flexibility allows for scenarios like displaying data in a multi-column table.
While ......
Creating a Databound Label Control
ASP.NET includes a number of data source and data Web controls that make it remarkably easy to work with data from a web page. For example, to display
the results of a database query simply add and configure a SqlDataSource control and then bind that to a GridView, ListView,
or some other data......
Displaying a Message in Response to Some Action and Then Hiding It on Subsequent Postbacks
ASP.NET web pages commonly display messages in response to user actions. For instance, a typical CRUD
(Create, Read, Update, Delete) web page might display the message, "Record deleted" immediately after deleting a record and the message "Record updated"
immediately after updating a record. Li......
Helping Visitors Search Your Site By Creating an OpenSearch Provider
One of the nicest features of modern browsers like Mozilla Firefox and Microsoft Internet Explorer is the search bar in the upper right corner.
With this tool you can quickly search any number of websites without having to first visit their search page.
This functionality is most commonly u......
Examining ASP.NET 2.0's Membership, Roles, and Profile - Part 12
Several of the earlier installments in this article series examined how to apply authorization rules in order to prohibit particular users, roles,
or classes of users from accessing particular resources. For instance, Part 2
showed how to define URL-based authorization rules in web.config for ......
Displaying Detail Records for User-Selected Master Records :: Saving the User's Search Preferences
Last week's article, Using a Dynamic IN Clause, showed how to display detail records
for a set of user-selected master records. This entailed creating a User Defined Function
(UDF) in the database that would translate a comma-delimited string into tabular data that could then be parsed by SQL'......
Displaying Detail Records for User-Selected Master Records :: Using a Dynamic IN Clause
The master/detail report pattern is used to display information in two database tables that share a one-to-many relationship. Typically the user is shown
a list of the master records and can pick one to view the corresponding detail records. Consider the Northwind database that models product in......
Techniques for Randomly Reordering an Array
While reading through some of Jeff Atwood's old blog entries, I stumbled across this gem:
The Danger of Naivete. In it, Jeff discussed the pitfalls the can befall a programmer
who implements a naive algorithm and calls it a day. Consider an algorithm to randomly reorder an array. If you have a ......
Building Interactive User Interfaces with Microsoft ASP.NET AJAX: Using the Timer Control
Microsoft's ASP.NET AJAX framework ships with a mere five Web controls: the ScriptManager and ScriptManagerProxy;
the UpdatePanel; the UpdateProgress; and the Timer. Previous installments in this article series have examined all but one control, the Timer.
As we've seen from the first installme......
Disabling a User Interface Element During a Partial Page Postback
When using Microsoft's ASP.NET AJAX framework and an UpdatePanel whose ChildrenAsTriggers is set to True (the default), anytime a user interface element
within the UpdatePanel would normally cause a full page postback, a partial page postback is performed instead. For example, clicking a Button......
Picking Dates with a Free RJS PopCalendar, a Free ASP.NET Popup Calendar Control
A common user interface element for entering date values is a popup calendar. For example, virtually all travel and booking websites prompt for dates using a textbox that, when
clicked or focused, displays a calendar that hovers above the rest of the content on the page. Upon clicking a date fro......
Building Interactive User Interfaces with Microsoft ASP.NET AJAX: Providing Visual Feedback with the UpdateProgress Control
Microsoft's ASP.NET AJAX Framework helps page developers design more interactive web pages by streamlining the postback mechanism. In traditional web pages,
a full postback involves the browser re-requesting the page, which is then re-rendered. This re-rendered page markup is returned, in its en......
Working with XML Data Using LINQ, a TreeView, and a ListView :: Editing Data
ASP.NET includes a variety of tools for displaying and editing XML documents. A previous article, Working
with XML Data Using LINQ, a TreeView, and a ListView :: Displaying Data, showed how with a TreeView control, a ListView control, an XmlDataSource control,
a LinqDataSource control, and abou......
Working with XML Data Using LINQ, a TreeView, and a ListView :: Displaying Data
With more and more data being stored in XML, web applications today commonly need some way to view and edit the data stored in an XML file from a web
page interface. If the XML data is relatively "flat" and tabular in nature, we can use data Web controls like the DataGrid, GridView, and Repeater......
Creating an Online Boggle Solver :: Solving the Puzzle
My family enjoys playing games and one of our favorites is Boggle, an addictive word game where players attempt to find as many words in a 4x4 grid of
letters. At the end of a game, players are left wondering whether there were any unearthed words. To answer this question once and for all, I cre......
Creating an Online Boggle Solver :: Building the User Interface
I spend most of my day writing about ASP.NET or building ASP.NET applications for clients. As every ASP.NET developer knows, the bulk of ASP.NET development
centers around data access - building pages to collect user input and crafting reports to summarize that information. To help break this mo......
Importing an Excel Spreadsheet Using Typed DataSets and TableAdapters: Importing the Excel Spreadsheet
Over the past four installments in this article series we have: created a SQL Server database for our web application; created an ASP.NET web page that
enabled the visitor to upload an Excel spreadsheet and view its contents in a GridView; and created a Data Access Layer (DAL) using Typed DataSe......
Importing an Excel Spreadsheet Using Typed DataSets and TableAdapters: Creating a Data Access Layer (DAL)
Over the course of the past three tutorials we have created an ASP.NET page that allows the visitor to upload and display an Excel spreadsheet in a
GridView. Our end goal is to allow the user to import the rows in the spreadsheet into the two tables of our application database, a task we will co......
Importing an Excel Spreadsheet Using Typed DataSets and TableAdapters: Displaying the Uploaded Excel Spreadsheet
In Building the Importer Web Page and Uploading the Excel Spreadsheet we created
an interface for users to upload an Excel spreadsheet to the web server with the end goal being that a user could import the uploaded spreadsheet's
data into the application database. Before importing the data, i......
Importing an Excel Spreadsheet Using Typed DataSets and TableAdapters: Building the Importer Web Page and Uploading the Excel Spreadsheet
This article is the second in a series of step-by-step tutorials by Nannette Thacker
that show how to build an ASP.NET page to import an Excel spreadsheet into a database using Typed DataSets and
TableAdapters. Last week's article, Building the
Database, started with an overview of the syste......
Importing an Excel Spreadsheet Using Typed DataSets and TableAdapters: Building the Database
In most data-driven Web applications, users add data to the database by entering it through a web page. While this works well for most scenarios,
there are times when the user has already collected the data to enter elsewhere, and having them tediously re-enter it through a web page is not only
......
Creating an AJAX-Enabled Calendar Control
Go to any travel or event booking website and you'll find the same user interface for collecting date information: the Calendar. Providing such an interface
in an ASP.NET application is a breeze, thanks to the built-in Calendar Web control. There are two downsides to ASP.NET's Calendar control: ......
Using ASP.NET 3.5's ListView and DataPager Controls: Paging Through Data with the ListView and DataPager Controls
The GridView, DetailsView, and FormView controls all support out of the box paging support that can be enabled at the tick of a checkbox. When configured
to enable paging, these controls automatically render a paging interface comprised of LinkButtons, Buttons, or ImageButtons. The particular pa......
Working Around ASP.NET's HyperLink ImageUrl Bug
If you develop software long enough, you'll inevitably run into bugs in your
platform or framework of choice. It's important on those occasions that you
know how to apply the tools at your disposal to clarify the source of the bug;
reproduce it in a deterministic fashion; and either fix the bu......
Extending the GridView to Include Sort Arrows
Before ASP.NET version 2.0 was released, I wrote
a book and dozens of articles on the DataGrid control, which was the most functional data Web control in the
ASP.NET 1.x toolbox. While the DataGrid still exists in ASP.NET 2.0, the GridView control serves as
a much more functional and feature......
Using ASP.NET 3.5's ListView and DataPager Controls: Sorting Data with the ListView Control
When binding data to a GridView using a data source control, enabling sorting is as simple as ticking the "Enable Sorting" checkbox in the GridView's
Smart Tag. Enabling sorting turns each GridView column's header into a LinkButton that, when clicked, causes a postback and re-binds the data to
......
Two Common Pitfalls When Submitting a Web Form Using the Enter Key
When filling out a form on a web page you have probably experienced the fact that if you hit enter when typing in a single-line textbox the form is
submitted. This is a feature that browsers provide to make it possible to submit a form without having to touch the mouse. For example, when visitin......
Using ASP.NET 3.5's ListView and DataPager Controls: Grouping Data with the ListView Control
ASP.NET version 3.5 added two new data Web controls to the Toolbox: the ListView and DataPager. As discussed in the first installment of this article
series, Displaying Data with the ListView, the ListView control offers the same
built-in features found in the GridView, but much finer control o......
Using ASP.NET 3.5's ListView and DataPager Controls: Displaying Data with the ListView
In November 2007 Microsoft released ASP.NET 3.5. As noted in An Overview of
ASP.NET 3.5 and Visual Studio 2008, this released included two new ASP.NET data Web controls: the ListView and DataPager. In a nutshell, the ListView
control provides a very flexible means for displaying a collection of......
Disabling the Submit Button Until a CheckBox is Checked
ASP.NET provides a variety of validation Web controls that can be used to validate a user's form field inputs.
Unfortunately, the validation Web controls do not work with the CheckBox or CheckBoxList Web controls. In a previous article,
Creating Validator Controls for the CheckBox and CheckBox......
Personalizing RSS Feeds with ASP.NET 2.0
Really Simple Syndication (RSS) is a common XML standard for syndaicating
web content. It is typically used by content-producing sites to offer a machine-readable version of the latest headlines. For example, news sites
like CNN.com and MSNBC.com offer RSS feeds for breaking news; most blog softw......
Rolling Your Own Website Administration Tool - Part 2
To help administer users, roles, and authorization settings, ASP.NET 2.0 includes the
Web Site Administration Tool (WSAT), which is available
from Visual Studio 2005 by going to the Website menu and then choosing the ASP.NET Configuration
option. Launching the WSAT from Visual Studio, howeve......
Rolling Your Own Website Administration Tool - Part 1
Forms-based authentication combined with ASP.NET 2.0's Membership and
Roles systems makes creating and managing user accounts incredibly easy. I continue to be amazed at how
the login-related Web controls encapsulate the array
of tasks that I had always had to code by hand in classic ASP.
......
Debugging SQL Server 2005 Stored Procedures in Visual Studio
With Microsoft SQL Server 2000 it was possible to debug stored procedures from directly within Query Analyzer (see
Debugging a SQL Stored Procedure from inside SQL Server 2000
Query Analyzer for more information). With SQL Server 2005, however, this functionality was moved out of SQL Server Ma......
Deploying a Local Database to a Remote Web Host
Microsoft Visual Web Developer and SQL Server 2005 Express Edition make it easy to design, develop, and test ASP.NET web
applications locally. In my books,
tutorials, and classes,
the explanations, examples, and assignments often use these tools to develop web applications locally. After cr......
Maintaining a Log of Database Changes - Part 2
In Part 1 of this two-part article series we looked at
the motivation behind maintaining a log of database changes and compared and contrasted different techniques for persisting
historical data to "history" tables. In addition to creating the table (or tables) to store the historical data, we......
Creating Custom Configuration Sections in Web.config Using .NET 2.0's Configuration API
Most ASP.NET applications include a number of configuration settings, such as connection strings, mail server settings,
system-wide default settings, and so forth. While these settings could be hard-coded in the source code, it's usually a wiser
idea to place them in a configuration file, such ......
Health Monitoring in ASP.NET 2.0: Notifications via Email
A Multipart Series on ASP.NET 2.0's Health Monitoring System
The Health Monitoring system in ASP.NET 2.0 is designed to monitor the
health of a running ASP.NET application in a production environment. This article is one of an ongoing series on
the Health Monitoring system.
Health Monitoring B......
Health Monitoring in ASP.NET 2.0: The Basics
Software engineering involves a number of important stages that occur before the application is deployed, such as
requirements analysis, design, coding, and testing. The software engineering process, however, does not end once an
application has been deployed and is being used. Regardless of ......
Using Asymmetric Encryption and Digital Signatures in a SQL Server 2005 Database
Two previous article of ours, An Overview of Cryptographic Systems and
Encrypting Database Data and Using Symmetric Encryption in a SQL Server
2005 Database, explored cryptosystem fundamentals and looked at encryption support in Microsoft SQL Server 2005.
We compared and contrasted symmetric......
Using Symmetric Encryption in a SQL Server 2005 Database
As the attacks in which hackers use become more and more sophisticated, and the programs in which they attack become
increasingly complex, encryption is becoming the last line of defense in database management system (DBMS) security.
A previous article of ours, An Overview of Cryptographic Sys......
An Overview of Cryptographic Systems and Encrypting Database Data
As the attacks in which hackers use become more and more sophisticated, and the programs in which they attack become increasingly
complex, encryption is becoming the last line of defense in database management system (DBMS) security. Since Microsoft
announced their Trustworthy Computing secur......
Creating Custom Configuration Sections in Web.config
Most ASP.NET applications include a number of configuration settings, such as connection strings, mail server settings,
system-wide default settings, and so forth. While these settings could be hard-coded in the source code, it's usually a wiser
idea to place them in a configuration file, such ......
Passing Information Between Content and Master Pages
When graphic designers create a layout for a Web site, they typically break down page layout into distinct regions, such as
a common header that includes the logo and various navigation links, a left navigation menu perhaps, the main content area,
and perhaps some sort of site map or legalese a......