C#
Using the asp:Calendar Control - Part 5
by Heidi Bautista - 27-Dec-06
Reader Level:
In this installment of the Using the asp:Calendar control series you'll build on the previous part that showed how to display information retrieved from a SQL Server database. In this part you'll learn how to add a OnSelectionChanged handler that displays additional details about the event(s) on the selected day.
Along the way, you'll learn about optimizing your application to enhancement its performance.
The asp:Calendar Control Series:
Using the asp:Calendar Control - Part 1 - introduction to the control, describes basic functions and defaults. Shows the control embedded on a page.
Using the asp:Calendar Control - Part 2 - using the control in a popup page. Transferring the value from the popup to the main page.
Using the asp:Calendar Control - Part 3 - allowing the user to select an entire week or month. Additional styling options to customize both the look of the calendar and how it functions.
Using the asp:Calendar Control - Part 4 - displaying event data that's pulled from a database.
Using the asp:Calendar Control - Part 5 - displaying additional details for event(s) on the selected day. Performance tuning, too.
Using the asp:Calendar Control - Part 4
by Heidi Bautista - 08-Dec-06
Reader Level:
In this installment of the Using the asp:Calendar control series you'll learn how to add information retrieved from a SQL Server database to the Calendar control. Along the way, you'll learn how to use a parameter with the SqlDataSource control to refine the SELECT statement used to retrieve the data for the month currently displayed in the calendar. You'll also learn how to use a RowFilter to extract event data for a particular day. And, finally, you'll learn one technique for displaying the retrieved event data in your calendar.
There are lots of possibilities when it comes to displaying the data. This tutorial will show you how to use a Literal control to display and style the event title.
The asp:Calendar Control Series:
Using the asp:Calendar Control - Part 1 - introduction to the control, describes basic functions and defaults. Shows the control embedded on a page.
Using the asp:Calendar Control - Part 2 - using the control in a popup page. Transferring the value from the popup to the main page.
Using the asp:Calendar Control - Part 3 - allowing the user to select an entire week or month. Additional styling options to customize both the look of the calendar and how it functions.
Using the asp:Calendar Control - Part 4 - displaying event data that's pulled from a database.
Why You Should Use HeaderTemplate and FooterTemplate in a Repeater
by Heidi Bautista - 08-Nov-06
Reader Level:
When it's possible to accomplish a goal in multiple ways, how do you decide which pattern to follow? In this article we'll explore one such conundrum: Let's say you have an asp:repeater than repeats the data using an unordered list. The question is: Where do you put the open and close ul elements? Do you really need a header and footer template? The answer is: yes! Sure, it sounds simple (and it is) but the example demonstrates an important coding practice that good programmers should recognize.
ASP.NET v2.0 - Using the SiteMapDataSource and Menu Controls
by Heidi Bautista - 15-Sep-06
Reader Level:
Constructing menus for navigation is a really common task. Version 2.0 of the ASP.NET Framework provides all sorts of tools to make this task easier. In this tutorial, you'll learn how to create a multi-level menu using the
ASP.NET Application Folders
by Heidi Bautista - 25-Aug-06
Reader Level:
If you've worked with ASP.NET version 2.0 sites, you've probably seen folders like App_Themes and App_Data. But what are they and how are they used? Read on to find out.
File Uploading in ASP.NET - Part 3
by Heidi Bautista - 12-Jul-06
Reader Level:
The File Uploading in ASP.NET series has covered the following aspects so far:
- Part 1 - upload three files at the same time and allow the user to change the filename before the upload occurs.
- Part 2 - upload a single file and then insert the name of the uploaded file into the database.
In Part 3 we'll upload a single file again but this time we'll automatically rename the file after uploading it. We'll use the Stored Procedure server behavior rather than the Insert Record server behavior (used in Part 2) so that we can insert the row and change the filename in a single round trip to the database.
Along the way you'll get a chance to use the File and Path classes, both from the System.IO namespace and you'll see another example of controlling the execute of the MM:DataSet using its Expression attribute.
The File Uploading in ASP.NET Series:
File Uploading in ASP.NET - Part 1
File Uploading in ASP.NET - Part 2
File Uploading in ASP.NET - Part 3
CMX SendEmail User Control for ASP.NET Sites
by Heidi Bautista - 05-Jul-06
Reader Level:
This article introduces you to the CMX SendEmail user control. Drop the control on your .aspx page and you immediately have a CSS-styleable contact form for your website.
The CMX SendEmail user control's ease of use is especially convenient when you're working with designers who are comfortable using tags but may not be familiar with code. Even if you're a hardcore programmer you may still find the control convenient since it effectively separates presentation from business/logic.
File Uploading in ASP.NET - Part 2
by Heidi Bautista - 16-Jun-06
Reader Level:
In this tutorial, we'll extend the file uploading paradigm to include simultaneously updating the database to record the name of the uploaded file. Of course, it only makes sense to update the database if the file upload was successful. So we'll first upload the file and then update the database, if appropriate, using the Insert Record server behavior.
Code is presented in C# and VB.
The File Uploading with .NET Series:
File Uploading with ASP.NET
File Uploading in ASP.NET - Part 2
File Uploading with ASP.NET - Part 3
Converting from C# to VB
by Heidi Bautista - 05-Jun-06
Reader Level:
Face it. All programmers have a favorite language. And, we're usually pretty vehement about why it's the best choice, too! But it can be a real problem when you're searching for examples and all you find is code written in the other language! This article introduces you to a free online (and downloadable) tool that does a pretty good job of converting C# code into VB. The article also includes general and DW-specific tips to keep in mind when converting code by hand.
Using the asp:Panel Control to Simplify Complex Forms
by Heidi Bautista - 26-May-06
Reader Level:
In this tutorial you'll learn an easy method to break up long, tedious forms so that the user finds them easier to fill out and you have just a single file to maintain. The form elements are nested inside of asp:Panel controls so that you can show one panel at a time and hide the rest. The best part of this approach is that you don't have to worry about maintaining state. The ASP.NET Framework takes care of that for you. Even across multiple post backs. That allows you to refer to controls nested in hidden panels. Very convenient.
Another CSS Picker in ASP.NET
by Heidi Bautista - 10-May-06
Reader Level:
This article will show you an easy way to dynamically link to different CSS stylesheets based on practically any criteria you wish, for example, you can specify one stylesheet for IE users, another for FireFox users, and still another for all other browsers. This technique is particularly useful if your page renders differently in the various browsers and you need to make them consistent.
Exploring ASP.NET v2 - Part 7: Using the PasswordRecovery Control
by Heidi Bautista - 01-May-06
Reader Level:
In this installment, we'll look at using the PasswordRecovery control. As you might guess this control is handy for users who have forgotten their passwords. The functionality baked into this control is fully integrated with the membership provider we've been working with all along. For example, the user registration page discussed in Parts 1 and 5 uses the CreateUserWizard control, which includes a security question and answer. The PasswordRecovery control uses that security question/answer in conjunction with the username to verify the identity of the user and then emails the password to the user.
This tutorial will show you how to use the PasswordRecovery control with passwords that hashed, encrypted, or stored as clear text. Along the way you'll learn how to how to set up the mail settings in the web.config so that the password can be emailed to the user.
The Exploring ASP.NET v2 Series:
Exploring ASP.NET v2 - Part 1: Membership Tags, VWD, and Cassini
Exploring ASP.NET v2 - Part 2: VWD's ASP.NET Web Site Administration Tool
Exploring ASP.NET v2 - Part 3: Graduate to SQL Server 2000 and IIS
Exploring ASP.NET v2 - Part 4: Customizing the asp:Login control
Exploring ASP.NET v2 - Part 5: Customizing the asp:CreateUserWizard control
Exploring ASP.NET v2 - Part 6: Customizing User Registration Requirements
Exploring ASP.NET v2 - Part 7: Using the PasswordRecovery Control
Exploring ASP.NET v2 - Part 6: Customizing User Registration Requirements
by Heidi Bautista - 17-Apr-06
Reader Level:
The previous installment of this series described how to customize the
The Exploring ASP.NET v2 Series:
Exploring ASP.NET v2 - Part 1: Membership Tags, VWD, and Cassini
Exploring ASP.NET v2 - Part 2: VWD's ASP.NET Web Site Administration Tool
Exploring ASP.NET v2 - Part 3: Graduate to SQL Server 2000 and IIS
Exploring ASP.NET v2 - Part 4: Customizing the asp:Login control
Exploring ASP.NET v2 - Part 5: Customizing the asp:CreateUserWizard control
Exploring ASP.NET v2 - Part 6: Customizing User Registration Requirements
Exploring ASP.NET v2 - Part 7: Using the PasswordRecovery Control
Creating a ZIP File Backup of Your Website in ASP.NET
by Heidi Bautista - 05-Apr-06
Reader Level:
This tutorial will show you how to backup a web site by creating a zip file that contains all files in the site. This task is made considerably simpler because of a cool, open source library available from ICSharpCode called #ziplib (pronounced sharp zip lib). I originally used this library to automate the backup for a bank site but there are endless possibilities when you stop to consider that this library allows you to create and add to an archive, as well as unpack the archive. This tutorial creates a ZIP file, but the library supports other formats, too, including GZip, Tar and BZip2.
The sample application automatically creates the zip file such that it contains every file in the website. In this tutorial, you'll learn how to use the DirectoryInfo and FileInfo classes to recurse through the site and then use the #ZipLib classes to add the files to zip archive.
Exploring ASP.NET v2 - Part 5: Customizing the asp:CreateUserWizard Control
by Heidi Bautista - 28-Mar-06
Reader Level:
In this tutorial you'll learn about the CreateUserWizard control. Specifically, you'll see how this control is part of Microsoft's answer to handling navigation and state management in multi-step forms. You'll learn how to customize the contents in each of the two steps of the CreateUserWizard control, as well as how to customize the submit buttons in both steps. You'll see a real-life example of styling these forms using CSS. And you'll learn how to use many of the CreateUserWizard control's attributes; how to incorporate ASP.NET validator controls to ensure that the user enters proper information in each textbox; how to require a unique user name (a common feature of registration forms); how to automatically generate strong passwords (always a good idea); and how to create disabled user accounts and then enable those accounts using VWD's ASP.NET web site administration tool.
The Exploring ASP.NET v2 Series:
Exploring ASP.NET v2 - Part 1: Membership Tags, VWD, and Cassini
Exploring ASP.NET v2 - Part 2: VWD's ASP.NET Web Site Administration Tool
Exploring ASP.NET v2 - Part 3: Graduate to SQL Server 2000 and IIS
Exploring ASP.NET v2 - Part 4: Customizing the asp:Login control
Exploring ASP.NET v2 - Part 5: Customizing the asp:CreateUserWizard control
Exploring ASP.NET v2 - Part 6: Customizing User Registration Requirements
Exploring ASP.NET v2 - Part 7: Using the PasswordRecovery Control
Exploring ASP.NET v2 - Part 4: Customizing the asp:Login Control
by Heidi Bautista - 16-Feb-06
Reader Level:
In this part of the Exploring ASP.NET v2 series you'll learn how to customize the asp:Login control using VWD's built-in "chrome" feature, which allows you to convert the control to use a layout template. This allows for much greater flexibility in the look of the login form. Plus you can replace the auto-generated table markup with more accessible and css-friendly code that you provide. This article also discusses several of the login control's attributes, such as the "Remember me next time" checkbox, pages to redirect to upon success of failure, and form validation error messages.
The Exploring ASP.NET v2 Series:
Exploring ASP.NET v2 - Part 1: Membership Tags, VWD, and Cassini
Exploring ASP.NET v2 - Part 2: VWD's ASP.NET Web Site Administration Tool
Exploring ASP.NET v2 - Part 3: Graduate to SQL Server 2000 and IIS
Exploring ASP.NET v2 - Part 4: Customizing the asp:Login control
Exploring ASP.NET v2 - Part 5: Customizing the asp:CreateUserWizard control
Exploring ASP.NET v2 - Part 6: Customizing User Registration Requirements
Exploring ASP.NET v2 - Part 7: Using the PasswordRecovery Control
Exploring ASP.NET v2 - Part 3: Graduate to SQL Server 2000 and IIS
by Heidi Bautista - 03-Feb-06
Reader Level:
Ready to deploy your v2 app? This article will show you how to graduate to SQL Server 2000 and IIS.
In this part of the Exploring ASP.NET v2 series you'll learn how to use SQL Server 2000 instead of SQL Server 2005 Express to store the data needed for membership, roles, profiles, and personalization. The Express edition is great for development but it's not appropriate for deployment. This article shows you how to create the database, configure and populate it. In addition, you'll learn how to use IIS instead of Cassini to test and debug your pages.
The Exploring ASP.NET v2 Series:
Exploring ASP.NET v2 - Part 1: Membership Tags, VWD, and Cassini
Exploring ASP.NET v2 - Part 2: VWD's ASP.NET Web Site Administration Tool
Exploring ASP.NET v2 - Part 3: Graduate to SQL Server 2000 and IIS
Exploring ASP.NET v2 - Part 4: Customizing the asp:Login control
Exploring ASP.NET v2 - Part 5: Customizing the asp:CreateUserWizard control
Exploring ASP.NET v2 - Part 6: Customizing User Registration Requirements
Exploring ASP.NET v2 - Part 7: Using the PasswordRecovery Control
Approximate download size: 506k
Exploring ASP.NET v2 - Part 2: VWD's ASP.NET Web Site Administration Tool
by Heidi Bautista - 20-Jan-06
Reader Level:
Part 2 of the series exploring ASP.NET v2 membership tags, the MS Visual Web Developer 2005 Express Edition, and the Cassini web server. The emphasis of this part is using the built-in ASP.NET Web Site Administration tool to enable roles and create access rules such that certain folders are protected from unauthorized access.
The Exploring ASP.NET v2 Series:
Exploring ASP.NET v2 - Part 1: Membership Tags, VWD, and Cassini
Exploring ASP.NET v2 - Part 2: VWD's ASP.NET Web Site Administration Tool
Exploring ASP.NET v2 - Part 3: Graduate to SQL Server 2000 and IIS
Exploring ASP.NET v2 - Part 4: Customizing the asp:Login control
Exploring ASP.NET v2 - Part 5: Customizing the asp:CreateUserWizard control
Exploring ASP.NET v2 - Part 6: Customizing User Registration Requirements
Exploring ASP.NET v2 - Part 7: Using the PasswordRecovery Control
Exploring ASP.NET v2 - Part 1: Membership Tags, VWD, and Cassini
by Heidi Bautista - 09-Jan-06
Reader Level:
This is the first article in what promises to be a long and fruitful series focusing on the ASP.NET 2.0 membership tags. Along the way you'll learn about Visual Web Developer 2005 Express Edition (VWD), the Cassini web server, and Sql Server 20005 Express.
The v2 membership tags greatly simplify what in v1.1 was a relatively complicated task. With a handful of controls you get the user interface, event handling, and database needed for all types of user authentication scenarios. This article includes registration and login pages written in C#.
The Exploring ASP.NET v2 Series:
Exploring ASP.NET v2 - Part 1: Membership Tags, VWD, and Cassini
Exploring ASP.NET v2 - Part 2: VWD's ASP.NET Web Site Administration Tool
Exploring ASP.NET v2 - Part 3: Graduate to SQL Server 2000 and IIS
Exploring ASP.NET v2 - Part 4: Customizing the asp:Login control
Exploring ASP.NET v2 - Part 5: Customizing the asp:CreateUserWizard control
Exploring ASP.NET v2 - Part 6: Customizing User Registration Requirements
Exploring ASP.NET v2 - Part 7: Using the PasswordRecovery Control
Using Disk Files As the Data Source for a DropDownList, ListBox, CheckBoxList, or RadioButtonList
by Heidi Bautista - 18-Nov-05
Reader Level:
This tutorial demonstrates how you can create a data source from a list of files on the server and bind that data source to four different controls: DropDownList, ListBox, CheckBoxList, or RadioButtonList.
Searching for Data Using Wildcards in a Stored Procedure
by Heidi Bautista - 09-Nov-05
Reader Level:
This tutorial demonstrates how to create an ASP.NET page that searches for data in specific columns of a table. The technique described has the added advantage that the user can enter just a fragment corresponding to the data that resides in the table. You'll learn how to use the LIKE keyword and % wildcard in a stored procedure. And you'll see how the use of three Dreamweaver server behaviors nearly eliminates the need for you to write any code yourself!
Using the MM:If Custom Control on ASP.NET pages
by Heidi Bautista - 20-Oct-05
Reader Level:
The <MM:If> custom control included in DreamweaverCtrls.dll is handy when you need a quick and dirty way to show/hide a section of your page. It has limitations, which we'll get into, but on the positive side, it's very easy to use. This article discusses how to use the <MM:If> control, where it works well and where it fails, and how the <asp:Panel> control can be used when the <MM:If> is unsuitable.
Try/Catch and Exception Handling
by Heidi Bautista - 16-Sep-05
Reader Level:
Using try/catch blocks in your code is easier than you might think. Plus, it's good coding practice. Pairing try/catch with proper exception handling can help to make your application more reliable, robust, and easier to maintain. This article introduces the concepts of exception handling and the try/catch using C#, but the principles apply to all .NET languages.
Understanding ASP.NET's ViewState - Part 1
by Heidi Bautista - 31-Aug-05
Reader Level:
ViewState is one of the great things about ASP.NET. It is responsible for keeping track of the values of the controls in your form such that when the page is posted back to the server, the values in the controls are retained. To fully appreciate the usefulness of viewstate, cast your memory back to when you used classic ASP to code web pages with forms. You had to explicitly set the values for the form elements in order for them to display the same values they had when the form was submitted. ViewState automatically handles this chore for us. By default, no less!
Of course, it's not as simple as that. Nothing, it seems, in ASP.NET is. In this article, we'll begin exploring the nuances.
Uploading Files with ASP.NET
by Heidi Bautista - 24-Aug-05
Reader Level:
In this article you'll learn how to upload files to your web server using ASP.NET. Back in the old classic ASP days, this was a fairly difficult job. Not anymore!
Read on to learn how to upload one or multiple files, all files types or just certain kinds (based on the MIME type), and how to save the file using the original name or a user-specified name.
The code is presented in C# and VB.
The File Uploading with .NET Series:
File Uploading with ASP.NET
File Uploading in ASP.NET - Part 2
File Uploading with ASP.NET - Part 3
Using the asp:Calendar Control - Part 3
by Heidi Bautista - 16-Aug-05
Reader Level:
Further exploration of the asp:Calendar control. This part in the series shows you how to set up the calendar to allow the user to select a whole week or the entire month. You'll learn how to get the date(s) selected by the user. Plus, you'll learn quite a bit more about styling this versatile control.
The asp:Calendar Control Series:
Using the asp:Calendar Control - Part 1
Using the asp:Calendar Control - Part 2
Using the asp:Calendar Control - Part 3
Using the asp:Calendar Control - Part 4
Using the asp:Calendar Control - Part 2
by Heidi Bautista - 25-Jul-05
Reader Level:
Further exploration of the asp:Calendar control. This part in the series places the calendar in a popup window and shows you how to transfer the selected date to the main window by handling the SelectionChanged event.
The asp:Calendar Control Series:
Using the asp:Calendar Control - Part 1
Using the asp:Calendar Control - Part 2
Using the asp:Calendar Control - Part 3
Using the asp:Calendar Control - Part 4
Using the asp:Calendar Control - Part 1
by Heidi Bautista - 13-Jul-05
Reader Level:
The asp:Calendar control provides tons of built-in functionality that's quick and easy to leverage. Make your web pages even more professional-looking by allowing your users to input dates by selecting from a user-friendly calendar. Here in Part 1 you'll get a solid introduction to the control: how to add it to your page, how to customize the look of it, and most importantly, how to use the selected date.
The asp:Calendar Control Series:
Using the asp:Calendar Control - Part 1
Using the asp:Calendar Control - Part 2
Using the asp:Calendar Control - Part 3
Using the asp:Calendar Control - Part 4
Sending Email From Your ASP.NET Application - Part 4
by Heidi Bautista - 28-Jun-05
Reader Level:
In this installment of the ASP.NET email series, you'll learn how to send messages that include text and/or binary attachments.
The Sending Email From Your ASP.NET Application Series
Part 1
Part 2
Part 3
Part 4
Using the ASP.NET Insert Record Server Behavior - Part 2
by Heidi Bautista - 10-Jun-05
Reader Level:
This article picks up where Part 1 left off. You'll get a better understanding of how to use the Insert Record server behavior with datatypes other than just strings and you'll learn how to add the necessary modifications to the MM:Insert tag so that it handles the ASP.NET validators that have been added to the form. The sample pages are provided in C# and VB.NET.
Using the ASP.NET Insert Record Server Behavior - Part 1
by Heidi Bautista - 31-May-05
Reader Level:
This article shows you how to use the Insert Record server behavior to take data collected with a form and insert it into a table in a SQL Server database. It's fast and easy. You're likely to spend more time styling the form than doing the coding!
ASP.NET Snippet - ShortenString
by Heidi Bautista - 13-May-05
Reader Level:
Snippets on ASP.NET pages are great time-savers. This tutorial uses a snippet called ShortenString. The snippet contains a function wrapped in a server-side script block. ShortenString takes a long string and shortens it to a practical length. The tutorial includes the snippet (in C# and VB.NET) plus sample pages that use the snippet in an editable DataGrid. Rather than displaying a long cumbersome text block, the DataGrid shows abbreviated versions of the strings. Thus, the DataGrid takes up less space on the page and is easier to read. In edit mode, the DataGrid shows the complete, unabbreviated string in a multi-line textbox.
Verbatim Strings in ASP.NET
by Heidi Bautista - 02-May-05
Reader Level:
Working with verbatim strings in your ASP.NET C# pages makes life a lot easier when you've got to deal with pathnames or long cumbersome strings. Read on to learn how. And at the same time, learn more about string escape sequences.
Formatting Dates, Numeric Values, and Text on Your ASP.NET Pages - Part 2
by Heidi Bautista - 08-Apr-05
Reader Level:
Formatting strings in ASP.NET - without help from Dreamweaver. DW offers several built-in formatting options for many common formatting patterns for dates, numbers, and text, but sometimes you need uncommon formatting. That's when it's convenient to know how to apply your own standard and custom formats. In the second half of this two-part series, you'll learn how to create custom formatting for numbers and date/time values.
Formatting Dates, Numeric Values, and Text on Your ASP.NET Pages - Part 1
by Heidi Bautista - 30-Mar-05
Reader Level:
Formatting values on your ASP.NET pages is easier than you might think. Dreamweaver offers built-in formatting options for many common formatting patterns for dates, numbers, and text. But sometimes you need uncommon formatting or maybe it's just plain easier to bypass DW and do it yourself in code view.
Learn when and how to use DW's built-in formatting options in Part 1. Part 2 will explore customizing your own date/time, number, and text formats.
Sending Email From Your ASP.NET Application - Part 2
by Heidi Bautista - 07-Mar-05
Reader Level:
In this installment of the ASP.NET email series, you'll learn how to address your messages using friendly names in addition to the email addresses, use the MailMessage.UrlContentBase property to easily include images and links with relative paths, and send to a mailing list retrieved using a MM:DataSet tag.
Sample code in C# and VB.
The Sending Email From Your ASP.NET Application Series:
Part 1
Part 2
Part 3
Part 4
Sending Email From Your ASP.NET Application - Part 1
by Heidi Bautista - 24-Feb-05
Reader Level:
This is one of the most common tasks for an ASP.NET developer. Fortunately, it's quick and easy. In this series of tutorials, we'll walk through the process of creating and sending email messages for a variety of scenarios.
Part 1 introduces you to the two ASP.NET classes used (MailMessage and SmtpMail) and demonstrates how to
create a simple feedback form for your site. Later on we'll
explore how to create nice-looking HTML messages that include images, links, and attachments. Sample code
written in both C# and VB is included.
The Sending Email From Your ASP.NET Application Series:
Part 1
Part 2
Part 3
Part 4
Using DropdownLists, CheckBoxes, and TextBoxes in an Editable ASP.NET DataGrid
by Heidi Bautista - 09-Feb-05
Reader Level:
Learn how to easily add data-bound dropdown lists, checkboxes, and single and multi-line textboxes to your editable DataGrids. If you stick with these three types of controls you can still leverage Dreamweaver's built-in functionality provided by DreamweaverCtrls.dll to handle updating and deleting from your database. It's easier than you might think. Read on to learn this "trick of the trade."
Creating Dependent Dropdown Lists with Dreamweaver MX04 and ASP.NET - Part 2
by Heidi Bautista - 11-Jan-05
Reader Level:
Make smarter ASP.NET pages by implementing data-bound dependent dropdown lists. The selection in the first dropdown list dictates the contents of the second dropdown list and the selection in the second dropdown list dictates the contents of the third dropdown list.
Part 1 showed how to make the data-bound dropdown lists plus how to make the second one dependent on the first.
Here in Part 2, we first extend the paradigm to three dropdown lists and then generalize the technique so that you can add as many dependent dropdown lists as you wish.
Creating Dependent Dropdown Lists with Dreamweaver MX04 and ASP.NET - Part 1
by Heidi Bautista - 30-Dec-04
Reader Level:
Make smarter ASP.NET pages by implementing data-bound dependent dropdown lists. The selection in the first dropdown list dictates the contents of the second dropdown list.
Here in Part 1 you'll learn how to make the data-bound dropdown lists plus how to make the second one dependent on the first.
In Part 2, we'll extend the paradigm to three or more dropdown lists. Along the way you'll get a better understanding of view state and the Dreamweaver MM:DataBind custom tag.
Automatically Add Headers and Footers to Every Page Using ASP.NET - Part 2
by Heidi Bautista - 13-Dec-04
Reader Level:
Say it with me - "No more cloning!" That's right, you can add the same header and footer to every page in your ASP.NET website by modifying just the Global.asax. This article is the second in a series. You'll learn how to create a custom filter, which is used to insert the header and footer text in every .aspx page. This technique is better than the one described in Part 1 in that each page retains its own distinctive head section. And as an added bonus, you'll learn about a handy C# concept called verbatim literal strings.
Automatically Add Headers and Footers to Every Page Using ASP.NET - Part 1
by Heidi Bautista - 30-Nov-04
Reader Level:
Learn how to add the same header and footer to every page in your site. You're probably already aware of several techniques, including using server-side includes and Dreamweaver templates. The problem is they all require you to clone code, which oftentimes creates a maintenance nightmare. In this series of articles, you'll learn how to leverage the Context object in ASP.NET to accomplish the same goal - without having to clone any code!
Generating Random Strings With .NET
by Heidi Bautista - 17-Nov-04
Reader Level:
Learn how to create randomly generated usernames and passwords with .NET.
This article uses the the Random and RNGCryptoServiceProvider classes to generate random numbers, which in turn are used to create strings suitable for usernames and "strong" passwords. That is, passwords that pass the test of: at least eight characters long, containing letters, numbers, and special characters.
Pair this article with the series on Forms Authentication to help you create a truly secure site.
And, as an added attraction, this article uses the modulus operator. If you've never used it before, this article will give you a clearer idea of its usefulness.
Protect .zip and .exe Files on Your Server Using an HttpHandler - Part 2
by Heidi Bautista - 18-Oct-04
Reader Level:
Forms authentication is a clever way to protect resources within specified folders of your web site. The problem is, by default only ASP.NET resources (e.g., .aspx, .asmx, .ascx, .asax, .config files plus a couple others) are protected. But what if you have .zip files or .exe files in those folders as well? If not explicitly protected, users who know the location and name of the .exe or .zip file can simply browse to the file and download it from your server. Not a happy situation. Fortunately, there's a solution. In this two-part article, you'll learn how to protect non-ASP.NET resources. By the end of Part 2, you should be able to extend the paradigm to protect other types of files as well.
Protect .zip and .exe Files on Your Server Using an HttpHandler - Part 1
by Heidi Bautista - 04-Oct-04
Reader Level:
Forms authentication is a clever way to protect resources within specified folders of your website. The problem is, by default only ASP.NET resources (e.g., .aspx, .asmx, .ascx, .asax, .config files plus a couple others) are protected. But what if you have .zip files or .exe files in those folders as well? If not explicitly protected, users who know the location and name of the .exe or .zip file can simply browse to the file and download it from your server. Not a happy situation. Fortunately, there's a solution. In this two-part article, you'll learn how to protect non-ASP.NET resources. By the end of Part 2, you should be able to extend the paradigm to protect other types of files, as well.
Using ASPMail on ASP.NET pages
by Heidi Bautista - 20-Sep-04
Reader Level:
One of the problems developers can run into when convincing a client to upgrade to .NET is their client's investment in ActiveX controls. Depending on what they've purchased, the investment can be substantial. Wouldn't it be great if you could use those old ActiveX controls on your new ASP.NET pages? Well, you can. It takes an extra step or two, but the work is well worth the effort.
In this tutorial, you'll learn how to use the ever popular ASPMail ActiveX control from ServerObjects on an aspx page. After reading this tutorial, you'll be able to apply the information to any ActiveX control.
Nested Repeat Regions in ASP.NET
by Heidi Bautista - 08-Sep-04
Reader Level:
Using nested repeat regions is a great way to display data in a highly organized fashion. In this tutorial you'll learn how to use Dreamweaver's DataSet and DataGrid server behaviors to display the products from the Northwind sample database, grouped by category. You'll learn how to selectively display the category name just a single time, at the beginning of the list of products in that category, thus avoiding unnecessary and messy replication of redundant data. Dreamweaver's ASP.NET implementation really is customizable! Read on to find out how.
Conditionally Show and Hide the Contents of a DataGrid Cell
by Heidi Bautista - 09-Aug-04
Reader Level:
Subscribers, thanks for giving us ideas for tutorials! This question popped up on the PL -.Net forum recently:
"Is it possible to conditionally show the contents of a cell? I have a cell that can be either true or false. I only want to show the contents of the cell if it is false."
Yes, indeed, that's possible, and this tutorial will explain how. Plus, you'll learn how to conditionally show the contents of one cell based on the true/false value in another cell.
Batch Updates in ASP.NET - Part 2
by Heidi Bautista - 26-Jul-04
Reader Level:
This tutorial explains how to perform a batch update in ASP.NET using strictly the .NET Framework. You can accomplish the same goal with Dreamweaver's Update Record server behavior, too. (See Using Dreamweaver and .NET For Batch Updates - Part 1.) Which method is best for you? Read both tutorials to learn the pros and cons of each approach.
Using Dreamweaver and .NET For Batch Updates - Part 1
by Heidi Bautista - 14-Jul-04
Reader Level:
The Update Record server behavior is convenient and easy to use when you need to update a single row of a table using values collected from a form. But what if you want to update many rows simultaneously and don't want to bother with filling out a form for each and every item? In this tutorial you'll learn how to modify Dreamweaver's Update Record server behavior to perform a batch update. With a bit of hand-coding you can still take advantage of Dreamweaver's built-in server behavior.
SmartNavigation in ASP.NET
by Heidi Bautista - 17-Jun-04
Reader Level:
Just how "smart" is Smart Navigation? Well, if you want to persist the page's scroll position, persist control focus and stop the page from flashing between post backs, or keep the history uncluttered, then this is the ASP.NET feature for you. Just beware the known pitfalls!
ASP.NET Session State and the web.config - Part 2
by Heidi Bautista - 03-Jun-04
Reader Level:
ASP.NET session state made simple. In this 2-part article you'll learn how to set and use session variables; why session state management in ASP.NET is superior to classic ASP; and what to do with your web.config file to make it all work.
Part 2 covers how to enable StateServer and SQLServer session state storage and the pros and cons of all three types of session state management.
ASP.NET Session State and the web.config - Part 1
by Heidi Bautista - 21-May-04
Reader Level:
ASP.NET session state made simple. In this 2-part article you'll learn how to set and use session variables; why session state management in ASP.NET is superior to classic ASP; and what to do with your web.config file to make it all work.
Part 1 covers the basics of session state managment and the web.config.
Working with the asp:ListBox
by Heidi Bautista - 14-May-04
Reader Level:
In this article, we are going to explore the
Advanced User Authentication with .NET and Dreamweaver - Part 3
by Heidi Bautista - 04-May-04
Reader Level:
This is Part 3 of the Advanced User Authentication with .NET and Dreamweaver series. You've created a great two-role authentication scheme using the first two parts of this tutorial series, but now your boss says you actually need three roles. Well, maybe four or five, he's not really sure. No problem. This tutorial takes you through the process of how to store and use role information from a database. And, while you're at it, impress your boss by throwing in some nifty site personalization, which is also covered in this tutorial.
Toggle Between Showing All Rows and Showing a Paged View of Results
by Heidi Bautista - 22-Apr-04
Reader Level:
Learn how to enhance the usability of a page of data by including a link that the allows the user to toggle between showing all rows and showing a subset of rows over a series of pages. This tutorial uses the Macromedia custom Dataset tag as well as several server behaviors (repeat region, dataset paging, show region) and the DataGrid tag to display data on the page. Two sample pages written in C# are included.
Using An asp:CheckBoxList Control With Dynamic Data - Part 2
by Heidi Bautista - 24-Mar-04
Reader Level:
In Part 1 of this series, we learned how to populate an asp:CheckBoxList control with data from a SQL Server database. Part 2 covers how to update the database using a stored procedure that takes as input the selections made in the CheckBoxList control.
Using the asp:CheckBoxList control and determining which items are selected
by Heidi Bautista - 04-Mar-04
Reader Level:
Learn how to create an asp:CheckBoxList control, configure its display characteristics, and determine which check boxes were selected. Along the way learn about creating an OnClick event handler and get a first hand look at the benefits of view state preservation in ASP.NET.
Server Behaviors: DataSet, Repeat Region, DataSet Paging, and Show Region
by Heidi Bautista - 27-Feb-04
Reader Level:
Harness the power of Dreamweaver's built-in server behaviors. In this tutorial you'll learn how to:
- retrieve data with the DataSet server behavior
- display it with the Repeat Region server behavior
- add paging links with the DataSet Paging server behavior
- and show/hide the paging links using the Show Region server behaviors
VB's IIf Function vs C#'s Ternary Operator
by Heidi Bautista - 23-Feb-04
Reader Level:
What's better? C# or VB? It depends on a lot of factors. You can nearly always accomplish your objectives in either language but sometimes one is better suited than the other. Read on to learn about the similarities and differences between VB's IIf function and C#'s ternary operator.
Customized ASP.NET DataGrid: Making One Column Dependent Upon Another
by Heidi Bautista - 10-Feb-04
Reader Level:
Learn how to use Dreamweaver to customize the display and functionality of your DataGrid. Along the way you'll learn about these other useful techniques:using the DataSet tag's Expression attribute to control when it gets executed; using a Free form column in a DataGrid; using a ternary expression (C#) / IIf function (VB) to control logic flow; using the MM:If server behavior to control what gets displayed.
Automatic Thumbnail Generation with ASP.NET
by Heidi Bautista - 29-Jan-04
Reader Level:
Thumbnail generation is something all of us have to do at some time or another, so why not make it as simple and automated as possible? This ASP.NET tutorial shows you how to automatically generate and display thumbnail images.
Create a User Control in ASP.NET
by Heidi Bautista - 20-Jan-04
Reader Level:
Dive into user controls! This tutorial shows you how to encapsulate the logic of an already-existing aspx page into a user control. Start taking advantage of the tag-based declarative syntax offered by user controls.
Dynamically Manipulate Images with ASP.NET
by Heidi Bautista - 08-Jan-04
Reader Level:
Continue your education in graphics manipulation with ASP.NET. This tutorial walks you through image resizing given maximum width and height restrictions and how to add photo corners to your images to dress up your online photo albums. Along the way you'll learn more about working with the Graphics object, or canvas. (The code presented here is based on code developed in Dynamically Add a Watermark to an Image Using ASP.NET.)
Dynamically Add a Watermark to an Image Using ASP.NET
by Heidi Bautista - 06-Jan-04
Reader Level:
Learn how to dynamically add a copyright notice (e.g., watermark) to an image before it's sent down to the browser. This technique is particularly useful when you have many, many images that you want copyright notices to appear on, but you don't want to take the time to add the notice to each and every image by hand.
Reading From and Writing To Files Using ASP.NET
by Heidi Bautista - 04-Dec-03
Reader Level:
Learn about file I/O with ASP.NET: using streams, the System.IO namespace, stream readers and writers, plus some security concerns to keep in mind when you're working with files.
Tracing - A Better Way to Debug Your ASP.NET Applications
by Heidi Bautista - 28-Nov-03
Reader Level:
Tracing: a debugging tool that's easy to enable and disable. Get information about your page's execution - control hierarchy, session state, and application state - as well as form values, query string variables, and header info.
Whidbey: New ASP.NET Tags for Member Management
by Heidi Bautista - 20-Nov-03
Reader Level:
Microsoft introduced the newest version of ASP.NET, code-named "Whidbey" at last month's PDC. Didn't attend? No problem. Read on for an overview of the new login, membership, and role classes. Get an early look at how Microsoft plans to simplify the ubiquitous task of member management.
Making asynchronous Web service calls in ASP.NET
by Heidi Bautista - 23-Oct-03
Reader Level:
Asynchronous web service calls aren't nearly as difficult to implement as they sound, which is nice because they offer the .NET developer a true performance boost. Read on to take advantage of this powerful technology.
Fun with the DataGrid tag, Part 3
by Heidi Bautista - 19-Aug-03
Reader Level:
The ASP.NET DataGrid is a data-bound list control that uses a table to display and/or modify information. In this three-part tutorial, we'll take a look at creating DataGrids using Dreamweaver's DataGrid server behavior. You'll learn how to customize the look of the DataGrid and make it editable. In addition, you'll pick up some useful tips regarding the inter-relation between Dreamweaver's custom DataSet tag and the DataGrid control.
In part 1, we'll go over setting up your Dreamweaver site, connecting to the database, creating the data source for the DataGrid, and creating a simple DataGrid. Part 2 describes several techniques you can use to customize the appearance of the DataGrid. And Part 3 will cover making your DataGrid editable.
Fun with the DataGrid tag, Part 2
by Heidi Bautista - 30-Jul-03
Reader Level:
The ASP.NET DataGrid is a data-bound list control that uses a table to display and/or modify information. In this three-part tutorial, we'll take a look at creating DataGrids using Dreamweaver's DataGrid server behavior. You'll learn how to customize the look of the DataGrid and make it editable. In addition, you'll pick up some useful tips regarding the inter-relation between Dreamweaver's custom DataSet tag and the DataGrid control.
In part 1, we'll go over setting up your Dreamweaver site, connecting to the database, creating the data source for the DataGrid, and creating a simple DataGrid. Part 2 describes several techniques you can use to customize the appearance of the DataGrid. And Part 3 will cover making your DataGrid editable.
ASP.NET Validator Controls
by Heidi Bautista - 25-Jul-03
Reader Level:
Form validation has never been easier thanks for the new validator server controls included in the ASP.NET framework. Learn how to check for required entries, the expected data type, values within a specified range, patterns, etc. Plus, learn Dreamweaver tips and tricks for dropping these controls on your aspx page.
Fun with the DataGrid tag, Part 1
by Heidi Bautista - 17-Jul-03
Reader Level:
The ASP.NET DataGrid is a data-bound list control that uses a table to display and/or modify information. In this three-part tutorial, we'll take a look at creating DataGrids using Dreamweaver's DataGrid server behavior. You'll learn how to customize the look of the DataGrid and make it editable. In addition, you'll pick up some useful tips regarding the inter-relation between Dreamweaver's custom DataSet tag and the DataGrid control.
In part 1, we'll go over setting up your Dreamweaver site, connecting to the database, creating the data source for the DataGrid, and creating a simple DataGrid. Part 2 describes several techniques you can use to customize the appearance of the DataGrid. And Part 3 will cover making your DataGrid editable.
Advanced User Authentication with .NET and Dreamweaver, Part 2
by Heidi Bautista - 27-Jun-03
Reader Level:
This tutorial takes you step-by-step through the implementation of Forms-based Authentication using ASP.NET, Macromedia's custom DataSet tag, SQL Server 2000, and C#. Part 1 shows you how to set up a simple authentication scheme with a single type of user. Part 2 goes further. You'll learn how to examine the user's role to enable/disable access to your site's protected content.
Advanced User Authentication with .NET and Dreamweaver, Part 1
by Heidi Bautista - 26-Jun-03
Reader Level:
This tutorial takes you step-by-step through the implementation of Forms-based Authentication using ASP.NET, Macromedia's custom DataSet tag, SQL Server 2000, and C#. Part 1 shows you how to set up a simple authentication scheme with a single type of user. Part 2 goes further. You'll learn how to examine the user's role to enable/disable access to your site's protected content.



