Using Attributes to Improve the Quality and Usability of Your Code Part 1 - Decorating Business Objects for Data Binding

Posted by: Imar Spaanjaars at Thursday, May 04, 2006 8:46:34 PM in: ASP.NET 2.0
I am a big fan of attributes in .NET. Ever since I discovered them in .NET 1, I have been digging in the MSDN documentation to find more useful attributes that I can use to improve the quality of the code I write and design. With the release of .NET 2, the number of attributes has increased quite a bit. During my search I discovered a number of useful attributes that have helped me write better code so I thought it was time for a short article series about attributes. This installment, Part 1 - Decorating Business Objects for Data Binding talks about applying attributes to business objects to influence the way these objects are used and seen in data binding scenario's. In a future installment I'll discuss attributes that can be used to improve the debugging experience in the Visual Studio 2005 IDE.
Read on ...

A Better Alternative to Dreamweaver Templates

Posted by: Imar Spaanjaars at Wednesday, February 15, 2006 8:23:45 PM in: Web General

As a web developer and consultant, I am often involved in the upgrade or redesign process of existing web sites. Clients have had a site for a couple of years, and are now ready for something bigger, better or more feature rich. They approach the company I work for (Design IT) for a new web site. Upgrading (or even maintaining) these sites is often not an easy task, especially when they have been built with Dreamweaver and its Templates and Library features.

While in itself these features can be very useful, and allow you to create a consistent looking web site with little work, these features often make it hard to upgrade the web site. In this short article, I show you the common pitfalls with templates and library items, and show you a better alternative. While this article uses ASP for any sample code, the concepts also apply to other programming languages and web servers that support server side includes.

Read on ...

Migrating to ASP.NET 2 - Part 4 - Implementing Custom Providers for Membership, Roles and Profiles

Posted by: Imar Spaanjaars at Tuesday, February 07, 2006 7:18:44 PM in: ASP.NET 2.0

Update!! 05/03/2006
A while ago, Microsoft released the full source of the Built-in ASP.NET 2.0 Providers. Downloading the source is highly recommended if you want to create your own (or customize existing) providers. You can find more detail here: http://weblogs.asp.net/scottgu/archive/2006/04/13/442772.aspx.

This is the fourth part of a (long running) article series about migrating a .NET 1.x Web site to ASP.NET 2. This installment focuses on custom providers for the Membership and Role management features found in the .NET Framework. While out of the box these features make it very easy to implement security in a new site you build, you can't use them directly in existing web sites that already implemented a custom security mechanism.

Read on ...

Migrating to ASP.NET 2 - Part 3 - Migrating Business Logic, Content Pages and User Controls

Posted by: Imar Spaanjaars at Saturday, January 14, 2006 3:59:24 PM in: ASP.NET 2.0

This is the third part of a (long running) article series about migrating a .NET 1.1 Web site to ASP.NET 2.0. This installment focuses on the way I migrated my business logic, content pages and user controls.

Read on ...

How Do I Access the Profile of Other Users Directly in VB.NET?

Posted by: Imar Spaanjaars at Tuesday, January 03, 2006 10:44:39 PM in: ASP.NET 2.0

You may be aware of the new ASP.NET 2.0 Profile feature that allows you to store and retrieve information for the currently logged on user. This Profile feature makes it extremely simple to store user specific information, like a user's address, phone number, or site preferences. (Note: if you're not familiar with ASP.NET 2.0 Profiles check out the section Storing User Profiles in the ASP.NET Quick starts).

But what if you want to access the Profiles data for another user? For example, what if you want to allow a site administrator to change the personal data of all users in your site? The trick to make this possible is to use the ProfileCommon class, which inherits from ProfileBase. This article shows you how you can use this class to access the Profile data for arbitrary users.

Read on ...

How Do I Access the Profile of a Different User Directly in C#?

Posted by: Imar Spaanjaars at Tuesday, January 03, 2006 10:06:06 PM in: ASP.NET 2.0

You may be aware of the new ASP.NET 2.0 Profile feature that allows you to store and retrieve information for the currently logged on user. This Profile feature makes it extremely simple to store user specific information, like a user's address, phone number, or site preferences. (Note: if you're not familiar with ASP.NET 2.0 Profiles check out the section Storing User Profiles in the ASP.NET Quick starts).

But what if you want to access the Profiles data for another user? For example, what if you want to allow a site administrator to change the personal data of all users in your site? The trick to make this possible is to use the ProfileCommon class, which inherits from ProfileBase. This article shows you how you can use this class to access the Profile data for arbitrary users.

Read on ...

Getting a page's URL in code-behind

Posted by: Peter Lanoie at Saturday, August 06, 2005 8:24:37 PM in: ASP.NET 1.x
You may have the need to be able to get the URL to a page in a web application from the server code. This might be because the page could move or because the URL is dynamic in some way. While this would be a nice feature to have in .NET, there are reasons it is not. We'll discuss this and a simple solution for getting a page's URL in server-side code that saves us from hard coding it in the referencing pages.
Read on ...

Migrating to ASP.NET 2 - Part 2 - Setup and Master Pages

Posted by: Imar Spaanjaars at Sunday, January 23, 2005 1:46:56 PM in: ASP.NET 2.0

This is the second part of a (long running) article series about migrating a .NET 1.x Web site to ASP.NET 2. This installment focuses on the general setup of the new web site and the Master Page I am going to use.

Read on ...

'Re'implementing Interface Implementations: VB.NET vs. C#

Posted by: Peter Lanoie at Wednesday, January 05, 2005 5:09:34 PM in: .NET General
Let's say we have an interface implemented on a class. We want to create a subclass derived from the super class and change the implementation . The difference between C# and VB.Net make this a little tricky. So let's take a look at how it's done.
Read on ...

Migrating to ASP.NET 2 - Part 1 - Introduction

Posted by: Imar Spaanjaars at Sunday, January 02, 2005 3:09:46 PM in: ASP.NET 2.0

This is the first part of a (long running) article series about migrating a .NET 1.x Web site to ASP.NET 2. I'll show you how to take an existing site, and upgrade it to ASP.NET 2. As an example, I'll be using my own web site, Imar.Spaanjaars.Com, show you how I have designed and implemented the currently existing features, and how they can be upgraded to take advantage of the new ASP.NET 2.0 Framework. I won't be describing each and every feature in great detail, but instead focus on general concepts and techniques, and provide links to other articles with more in-depth information.

Each article starts with a little background about one of the new ASP.NET 2 features, like Master Pages, the new Login controls, the Provider Model, Skins, and so on. Next, I'll discuss how I implemented similar behavior in my current site, or how I managed to live without it. Then I'll explain how the new features work and how you can use it in your ASP applications. At the end of the article, I'll show you how I implemented the feature in my own site.

Read on ... 1234567891011