Dialogue Boxes in ASP.NET
by Kevin Koch

Dialogue boxes are a fundamental part of any application, whether it be a desktop or web application.  They provide a basic level of interaction between the application and the end user, allowing the user to control basic application flow through various messages.

Web applications in general often make it difficult to implement even basic functionality that is easily provided in the desktop world due to the single request/response methodology in a thin client/server model. To make matters worse, the ASP.NET postback pattern makes it even more difficult to customize page flow.

Although the postback pattern in ASP.NET has made a world of improvements in everyday basic development, it has also created several new shortcomings and limitations that require some trickery and creativity to make certain features work.

Adding even further to the limitations of the postback pattern is the use of JavaScript by the .NET framework to control most user interface events. Clicking a button for example executes some JavaScript which reloads the page, sending a postback event to the server.

The reason this complicates matters so much is because most developers turn to JavaScript when implementing basic client side features, such as confirmations, alerts and popups. Tying into the existing JavaScript used by the .NET framework isn’t always the easiest and requires a thorough understanding of the JavaScript utilized by .NET on web form controls.

In this tutorial we will look at 3 different methods of providing basic user input and interaction using JavaScript and ASP.NET controls. We will look at how we can append our own functionality to the built in .NET JavaScript functionality provided by ASP.NET user controls.

The 3 examples we will look at are as follows:

1)       Alert information display

2)       Confirmation conditional processing

3)       Modal Dialogue Popup window with conditional processing

Although this tutorial is built using ASP.NET with Visual Studio .NET, the code required is extremely simplistic and the functionality is geared more towards JavaScript client side code.

Note: Both VB.NET and C# examples are provided in this tutorial

- OR -

Kevin Koch

Kevin KochKevin Koch is a senior software engineer with over 8 years experience designing and architecting primarily web based applications. Fresh out of college during the nineties he co-founded Task Solutions and developed several projects with the then popular classic ASP.

During the Dot Com boom Kevin left his position as president and joined a new venture to build an enterprise insurance claim system build upon J2EE technology. After the Dot Com crash Kevin schooled himself to become an expert with .NET technology and is currently freelancing his ASP.NET skills to build enterprise n-tier frameworks using advanced OO methodologies.

See All Postings From Kevin Koch >>

Place your review about Dialogue Boxes in ASP.NET

You must me logged in to write a review

Be the first to place a review