Image representing the Articles category

Using Attributes to Improve the Quality and Usability of Your Code Part 2 - Improving Debugging

Published 17 years ago

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 2 - Improving Debugging shows you a number of useful attributes that you can apply to elements like methods and classes to improve your debugging experience.

Read on ...
Image representing the Articles category

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

Published 17 years ago

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 ...
Image representing the Articles category

A Better Alternative to Dreamweaver Templates

Published 18 years ago

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 ...
Image representing the Articles category

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

Published 18 years ago

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 ...
Image representing the Articles category

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

Published 18 years ago

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 ...
Image representing the Articles category

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

Published 18 years ago

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 ...
Image representing the Articles category

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

Published 18 years ago

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 ...
Image representing the Articles category

Getting a page's URL in code-behind

Published 18 years ago

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 ...
Image representing the Articles category

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

Published 19 years ago

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 ...
Image representing the Articles category

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

Published 19 years ago

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 ...

Mobile: False

Crawler: True

I: False