ASP.NET

Rediscovering Microsoft Free!
Reader Level: Reader Level

When Adobe released Dreamweaver CS4, one of the features conspicuously missing from the feature list was the .NET server model. If you still use the Microsoft stack to develop and host web applications and sites and haven't looked at the latest tools from Microsoft, then this the perfect opportunity to get up to speed on the latest Microsoft tech.

In this article we will learn how to set up your development environment, and also about the latest frameworks that Microsoft has to offer, such as entity framework and asp.net mvc

Expression Web Free!
Reader Level: Reader Level

Microsoft is seriously pursuing web designers these days, not just web developers. They already provide some pretty great authoring tools for developers. Visual Studio has been around forever but many designers find the design surface too ... minimal, shall we say. Visual Web Developer (VWD) Express Edition, the lighter-weight authoring tool introduced in 2005 is free, which is nice, but it's also targeted towards the developer audience.

Recently Microsoft launched a new initiative aimed at capturing the designer audience. Introducing Expression Studio: a suite of four products expressly designed for the web designer.
  • Expression Web - web authoring design tool
  • Expression Blend - user interface design tool that can incorporate multiple media types (vector and pixel art, video, audio, etc.)
  • Expression Design - illustration and graphic design tool
  • Expression Media - asset management tool, visually catalogues and organizes dozens of different media formats, based on the iView MediaPro product acquired by Microsoft in June, 2006.

This article reviews Expression Web - the web authoring tool included in Expression Studio.



Are you Google-Friendly? Free!
Reader Level: Reader Level

Is it possible to ensure that Google finds, crawls, and indexes your site? Well, no, there's no way to guarantee your site will be included in Google's index but you can make your site Google-friendly, thus improving your chances.

Google even provides the guidelines and tools. This article provides an overview of Google's Webmaster Tools and how you can use them to increase your Google-friendliness and in the process, hopefully, increase your ranking in the search results.

Added bonus for ASP.NET developers: learn about a freely available HTTP handler that converts your Web.sitemap to Google's preferred sitemap protocol.

Why You Should Use HeaderTemplate and FooterTemplate in a Repeater Free!
Reader Level: 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.

Getting Started with Atlas Free!
Reader Level: Reader Level

Just about everyone has heard of AJAX, right? The acronym stands for Asynchronous JavaScript and XML. One of the problems with AJAX is that many people found it difficult to use. Microsoft developed Atlas, in part, to address that issue. Atlas is an extension of ASP.NET. You don't have to use ASP.NET to leverage Atlas functionality, but I think you'll find that it's convenient to do so. In addition to the server-side controls, Atlas also comes with sophisticated client script libraries, saving you the labor of writing your own JavaScript.

In this first tutorial we'll download and install Atlas. Later tutorials will explore using Atlas to perform asynchronous postbacks (via the UpdatePanel). This is arguably the best feature of Atlas. You can have a form on your page and when the user hits the submit button, instead of the entire page posting back, just the form does. That means that the page's contents are still visible. The only disruption to the page is the contents of the form. A lot more user-friendly, eh? Atlas boasts other cool features, too, that will be explained in later installments.

ASP.NET Application Folders
Reader Level: 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.

CMX SendEmail User Control for ASP.NET Sites
Reader Level: 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.

Converting from C# to VB
Reader Level: 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
Reader Level: 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
Reader Level: 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.

Convert an Existing Site to Use ASP.NET Master Pages and Themes
Reader Level: Reader Level

One of the great advantages in ASP.NET v2.0 is the introduction of master pages and themes. This tutorial presents a practical example of converting an existing site to use master pages and themes. Our example site is the Community MX North Pole JumpStart. You'll learn how to chop up the code to create the master page, where to put the theme files and how to modify the existing css file so that it works well with the theme. It's actually a very quick process and one that can be adapted to any JumpStart offered by Community MX.

Approximate download size: 320k

Running PHP under ASP.NET?? Free!
Reader Level: Reader Level

I won't lie, I am a Microsoft lover. Their technology has been paying my salary for just about my entire career, and C# totally rocks in my quite humble opinion. But that being said, any programmer worth their salt knows that a specific technology is nothing more than a tool. If a given situation could be solved more efficiently with the use of non-Microsoft technology, then its your responsibility to investigate and (potentially) use said technology.

This article is going to review a nifty little project called Phalanger. Installing this on your ASP.NET web server allows you to deploy PHP code, even full applications like phpBB. Behind the scenes, the PHP code will be compiled to .NET code and run as an ASP.NET application.

The best thing about it is that you can, from PHP script, access .NET code (in your language of choice), and vice-versa. So if you have a nifty function written in PHP, you can use it in your .NET application. The Developers tout impressive performance improvements over the native PHP environement so this makes Phalanger an attractive target for your application platform.

Creating a Simple Blog: Part 6
Reader Level: Reader Level

There have been five parts in the series on creating a simple blog. The first five parts focused on creating basic functionality to get a basic blog up and running using simple Dreamweaver design tools. This part will show how to incorporate the functionality into a more complex design — specifically, the latest CMX Jumpstart — Inverness. This tutorial will be equally applicable to ColdFusion, ASP, PHP, ASP.NET, or JSP because we will be using standard Dreamweaver server behaviors to create the blog. In the course of merging the dynamic blog into the design, you'll learn the following about merging content with design in general — how to find repeating items and make them dynamic, how to separate parts of an existing design into a module.

The Meaning of ~ (tilde)
Reader Level: Reader Level

The inventors of ASP.NET took a different approach to solving the problems inherent in using absolute and relative URLs. They introduced the concept of tilde. The simplest, briefest definition of tilde is that it is the root of the application. The root of a website is, by definition an application root, but not all application roots are site roots. Huh? Yeah, the explanation gets a little hairy, but once the concept sinks in, I think you'll agree you'll begin to wonder how you ever lived without tilde.

Using the MM:If Custom Control on ASP.NET pages
Reader Level: 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.

CSS Picker in ASP.NET
Reader Level: Reader Level

The first time I came across a site that allowed you to select your own stylesheet, I was amazed at the stunning simplicity of the technique, and the powerful effect it could have on the user experience. Seeing as how ASP.NET is my server language of choice, I wanted to show how easy it was to implement this functionality in your very own site.

This article will show you how to create a CSS picker with ASP.NET using a Session variable and an HttpHandler. Code is presented in C# and you do not need a compiler to run the sample provided with the article.

Try/Catch and Exception Handling
Reader Level: 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
Reader Level: 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.

Getting Started with GotDotNet Workspaces Free!
Reader Level: Reader Level

Project management is a topic that can, and will, have volumes upon volumes written about it. In the software field, those with years of experience will tell you that one of the most basic and useful parts of the software development process is a good source control management system.

The topic has been covered before here on CMX by our very own Arman Danesh in his 5 part series:
Using Source Code Management Software

GotDotNet Workspaces) is a unique service offered by Microsoft. My aim with this article isn't to extoll the virtues of using source control software, it is to expose the masses to the fact that such a wonderful tool exists. A few short months ago (as of this writing), they revised the software behind it so it's even faster than before (a common complaint when they first came out).

In the past, when you thought of hosted source control, the first (and just about only) thing that popped to mind was Sourceforge. Now, there are two drawbacks there:
  1. You've got to use CVS which, while it works, I can't say it's the most userfriendly product on the market.
  2. Sourceforge has to review and approve your project ... so they might just say no.

With the Workspaces, a few short clicks and you've got yourself a workspace!



Using the asp:Calendar Control - Part 1
Reader Level: 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

Using the ASP.NET Insert Record Server Behavior - Part 1
Reader Level: 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
Reader Level: 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
Reader Level: 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.

Using ASPMail on ASP.NET pages
Reader Level: 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.

ASP.NET and Dreamweaver's Application Panel
Reader Level: Reader Level

As an ASP.NET developer, you've undoubtedly used the Application Panel. But if you're like me, you probably explored it only to the extent necessary to get the current job done. In this article, we'll explore the features in the Application panel more thoroughly. Perhaps you'll find something really useful that you didn't know about before.

SmartNavigation in ASP.NET
Reader Level: 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
Reader Level: 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
Reader Level: 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.

Design Time Support for ASP.NET Custom Controls Free!
Reader Level: Reader Level

Recognize the benefits of using custom controls, but bummed because they don't show up in Dreamweaver's design view? Well, start celebrating. It's actually pretty simple to enable design-time support for custom controls.

Creating a Simple Horizontal Looper in ASP.NET
Reader Level: Reader Level

There is no horizontal looper extension for Dreamweaver in ASP.NET, but there is no need for the extension because looping is built into the DataList Application object. This tutorial will show you how to create a simple Horizontal Looper using the DataList, including recordset navigation for the loop.

XML Parsing in .NET - Part 1
Reader Level: Reader Level

ASP.NET provides various types of classes and objects that can be utilized to access and synchronize XML data. In this study, we are going to investigate the XmlDocument approach, which is a DOM (Document Object Model) based model. Using this approach, the XML data is manipulated without regard to the order in which the particular nodes appear.

Creating a Simple Blog Part 1
Reader Level: Reader Level

Many people ask "how can I build my own blog?" This tutorial will show how to create a simple blog using point-and-click features of Dreamweaver. For that reason, this tutorial can be followed for any server model that Dreamweaver supports.

Using the asp:CheckBoxList control and determining which items are selected
Reader Level: 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
Reader Level: 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
Reader Level: 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.

Renaming Uploaded Files with ASP.NET
Reader Level: Reader Level

How to rename uploaded files in ASP.NET using the HtmlInputFile server control.

Using the Stored Procedure Server Behavior on ASP.NET Pages
Reader Level: Reader Level

It's well known that using stored procedures is better practice over using embedded SELECT statements in your code. Dreamweaver has a built-in server behavior called Stored Procedure that makes this process much easier on ASP.NET pages. Read on to learn how.

Tracing - A Better Way to Debug Your ASP.NET Applications
Reader Level: 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
Reader Level: 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.

New Property Inspectors for the ASP.NET form controls
Reader Level: Reader Level

Here's a sneak preview of the new property inspectors for the ASP.NET form controls in Dreamweaver MX 2004, and some of their more interesting features.

Fun with the DataGrid tag, Part 3
Reader Level: 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 DataSet tag, Part 2
Reader Level: Reader Level

Learn how to build your dynamic ASP.NET pages even faster by employing the power of the MM:DataSet tag to get and manipulate data prior to displaying it on your pages. In part one of this two-part article you'll learn the nuances of this custom tag's attributes and methods, including some performance tips. Part 2 will be all about examples; seeing the DataSet tag in action.

Fun with the DataGrid tag, Part 2
Reader Level: 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
Reader Level: 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
Reader Level: 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 DataSet Tag: Part 1
Reader Level: Reader Level

Learn how to build your dynamic ASP.NET pages even faster by employing the power of the MM:DataSet tag to get and manipulate data prior to displaying it on your pages. In part one of this two-part article you'll learn the nuances of this custom tag's attributes and methods, including some performance tips. Part 2 will be all about examples; seeing the DataSet tag in action.

Using CodeBehind in Dreamweaver
Reader Level: Reader Level

Dreamweaver MX doesn't natively support ASP.NET codebehind and all of its inherent advantages. This article will help you understand all that is necessary to create codebehind files and wire them up for use in Dreamweaver MX.

Forms Authentication & Authorization Series: Part 3
Reader Level: Reader Level

ASP.NET provides great built in functionality and tools for building secure web applications. In this article I will cover using Microsoft Access as the trusted source to authenticate against.

Forms Authentication & Authorization Series: Part 2
Reader Level: Reader Level

.NET has a bunch of excellent built in concepts and objects commonly needed in dynamic websites. Authentication and authorization is a big issue for many web designers and developers. This is an area in which ASP.NET provides many tools for the developer to sculpt their security strategies to take whatever form they desire. In part 2 we will investigate using the web.config file as the trusted source as well as how to encrypt your passwords in the web.config file.

Forms Authentication & Authorization Series: Part 1
Reader Level: Reader Level

.NET has a bunch of excellent built in concepts and objects commonly needed in dynamic websites. Authentication and authorization is a big issue for many web designers and developers. This is an area that ASP.NET provides many tools for the developer to sculpt their security stratgies to take whatever form they desire. In this Part we cover setting up the web.config file properly so you can utilize ASP.NET forms authentication

ASP.NET - Object Oriented Programming Basics
Reader Level: Reader Level

ASP.NET brings Object Oriented Programming to web application development. This article explores the difference between interpreted languages like ASP, PHP and Cold Fusion and an true OOP language in ASP.NET