Archives / 2007
  • The LINQ Dilemma

    Let me start off by saying that I'm a huge fan of Language Integrated Query (LINQ).  If you've ever had to write code to loop through objects to locate properties and then filter the collection based upon specific values then you'll definitely have an appreciation for what LINQ has to offer.  It's a phenomenal technology that will definitely make developing applications a more productive process.  Scott Guthrie has some really nice tutorials that help jumpstart learning more about LINQ and LINQ to SQL that you can view here.  For those that haven't seen many LINQ samples, here's a simple example of using LINQ to filter a collection of Customer types based upon a Country property:

  • Speaking on Silverlight and Web Services in Los Angeles Area

    I'm going to be speaking on behalf of Interface Technical Training and INETA this week at two Los Angeles area user groups.  The first talk is at Manhattan Beach, CA on October 2nd and will cover calling Web Services asynchronously in .NET 2.0.  The next talk is at Buena Park, CA on October 3rd and will cover building Silverlight applications. More details about the talks are shown next. 

  • JavaScript Beautifier Tool

    I was working on a new article on Silverlight tonight and needed to "beautify" the Silverlight.js code so that I could read through it more easily.  I came across a nice JavaScript beautifier tool that did a great job converting the unformatted file into an easy to read format.  I'm sure there are several of these tools out there on the Web, but this was the first one that popped up while searching and it worked quite well in case anyone needs that type of functionality.

  • Managing ASP.NET Development, Staging and Production Connection Strings (without pulling your hair out)

    If you work with a large number of applications then you know what a pain it can be to manage multiple web.config files and multiple connection strings for development, staging/test, and production databases.  Because developers typically have development, staging, and production connection strings to manage (depending upon the environment they are working in), many different strategies have been created to handle switching from development to staging/test to production. One way to manage this task is to have multiple web.config files and simply name them differently. For example, while in development the staging web.config file may be named web.stage.config. When code has been tested in development and needs to be deployed to staging/test, the staging web.config file can be renamed to "web.config" and then moved over to the staging Web Server(s). While this works well it involves an unnecessary step that should be more automated to avoid human error and involves keeping data in-sync between two or more web.config files.

    VS.NET build events are another popular way to handle this problem.  Scott Guthrie posted about this topic and links to a post that provides great details if you'd like to go this route. 

    When large numbers of developers are involved in creating different applications that have separate web.config files for each application that may hit the same databases, a management issue comes into play. If the database connection strings change at all (for instance moving from passing username/password credentials to integrated security or database name changes due to upgrades) then all web.config files with the appropriate connection strings in them must be updated. If you manage a large number of applications (an Intranet environment for example) then you now have to open many web.config files to modify the connection strings and hope that your search and replace routine catches everything.  A more centralized way to store connection strings needs to be available in this case so that you can go to one place to make changes and be done with it!

    The example code that follows demonstrates how to avoid renaming web.config files when applications are moved between environments while also providing a centralized storage location for database connection strings as well as other server information such as proxy servers and mail servers. The code relies upon XML serialization to load data from an XML file named ServerConfig.config into an object-model, detect the environment automatically based upon data in the ServerConfig.config file, and return the appropriate connection string for the environment (development, staging, production, etc.). It also allows primary and secondary connection strings to be accessed in cases where a secondary production database server is available to use when the primary is too busy or down. An example of the Server.Config file used in the downloadable sample code is shown below.  Each server defines the environment it supports as well as the domains that can run on it.  The domains are used to dynamically lookup the proper environment (dev, staging, prod, etc.) at runtime.

    <?xml version="1.0" encoding="utf-8" ?>
        <Server Name="DevelopmentServerName" Type="Web" Environment="Development" UserName="" Password="" Domain="" IP="">
        <Server Name="StagingServerName" Type="Web" Environment="Staging" UserName="" Password="" Domain="" IP="">
        <Server Name="ProductionServerName" Type="Web" Environment="Production" UserName="" Password="" Domain="" IP="">
        <Server Name="ProxyServerName" Type="Proxy" Environment="Production" UserName="" Password="" Domain="" IP="">
        <Server Name="MailServerName" Type="Mail" Environment="Production" UserName="" Password="" Domain="" IP="">
        <ConnectionString Database="Northwind">
          <Primary>server=prodServerName;Integrated Security=SSPI;database=Northwind</Primary>
          <Secondary>server=secondaryProdServerName;Integrated Security=SSPI;database=Northwind</Secondary>
          <Staging>server=stagingServerName;Integrated Security=SSPI;database=Northwind</Staging>
          <Development>server=devServerName;Integrated Security=SSPI;database=Northwind</Development>
        <ConnectionString Database="Pubs">
          <Primary>server=prodServerName;Integrated Security=SSPI;database=Pubs</Primary>
          <Secondary>server=secondaryProdServerName;Integrated Security=SSPI;database=Pubs</Secondary>
          <Staging>server=stagingServerName;Integrated Security=SSPI;database=Pubs</Staging>
          <Development>server=devServerName;Integrated Security=SSPI;database=Pubs</Development>

    Once the ServerConfig.config file is created you can reference it in web.config (or better yet, in a higher level config file that is global to the server) by adding the following:

        <!-- Suggest placing this in a more global location rather than in multiple web.config files -->
            <add key="ServerConfigPath" value="~/ServerConfig.config"/>

    The "ServerConfigPath" key is a fixed name in this case since the object model looks specifically for that key.  Where you put the ServerConfig.config file is up to you of course, but putting it in a place that multiple Web applications can access is recommended. 

    A sample of accessing the Northwind database connection string from a data layer class is shown below.  A class named ServerConfigManager does all the work of looking up the proper connection string to use based upon the domain that the application is currently running within.  If no matching domain is found, it defaults to the development environment (that behavior can certainly be changed) and returns the development connection string.

  • My Latest ASP.NET AJAX Articles

    Over the past few months I've been writing articles for the .NET Insight insight newsletter covering various ASP.NET AJAX concepts.  The articles are designed to be focused and concise and get straight to the topic without a lot of fluff.  Everything written to this point is listed below:

  • ASP.NET AJAX Script Library Patch for iPhone 1.01 Software Update

    Matt Gibbs recently posted about an update to the ASP.NET AJAX Script library that fixes functionality broken when trying to run ASP.NET AJAX-enabled pages in the iPhone's Safari browser when the 1.01 software update has been applied to a phone.  He posts a step-by-step guide to using the scripts and explains what was changed in case you're interested.

  • C# 3.0 Features: Object Initializers

    C# 3.0 is just around the corner so I thought I'd start writing about a few of the features that it exposes and provide quick and concise examples of how they can be used.  Many of the new features rely on the compiler to generate code that you would have had to write in the past. This can result in significantly less code compared to C# 2.0 syntax in many cases.  Here's a list of some of the key features available in C# 3.0:

  • Integrate Windows Live ID Authentication Into Your Website

    Microsoft recently released an SDK that allows you to integrate Windows Live ID authentication into your Website (ASP.NET or any other).  To get started you'll need to register your application and get an application ID.  From there it's quite straightforward especially since a sample application that uses Windows Live ID is available to download.  Sample code is available for ASP.NET, Java, Perl, PHP, Python, and Ruby.

  • Video How To: Getting Started with Subversion and Source Control

    In this video "how to" I walk through the steps required to install and configure Subversion to control your .NET source code revisions.  Several commercial options exist for source control of course such as Vault and Microsoft's Visual SourceSafe to name just two.  Subversion is an open source project (it's freely available) and has excellent documentation and support available.  It's also easy to use through the command-line or through TortoiseSVN.

  • How To: Create an ASP.NET AJAX Toolkit Extender Control to Extend a GridView

    In a previous post I showed examples of how CSS and JavaScript code could be used to freeze the header row of a GridView control and add scrolling capabilities for Internet Explorer and Firefox. Here’s an example of a GridView with a frozen header:

    In this post I’m going to discuss how to package up CSS and JavaScript files into a custom control that can be used on the server-side to extend the GridView. Doing this allows you to continue using the standard GridView that ships with ASP.NET 2.0 in applications while extending it’s functionality through a custom extender control.

    There are multiple ways to go about creating an AJAX control extender. You can use native classes available in the ASP.NET AJAX Extensions to build a control that would get the job done. However, doing so requires that you write custom code to map server-side properties to client-side properties which isn’t hard. Additional details on how to do this can be found in the ASP.NET 2.0 Professional AJAX book Matt Gibbs and I co-authored. You can download the code from the book here if you’d like to see the sample code (see the chapter 11 code).

    To simplify things as much as possible, I’m going to discuss how to build a custom control that is based upon the ASP.NET AJAX Control Toolkit available from http://www.codeplex/com/AtlasControlToolkit (that’s not a typo, they never changed the Atlas name to AJAX in the URL for some reason). The ASP.NET AJAX Control Toolkit provides a base class named ExtenderControlBase along with several attribute classes that minimize the amount of code that has to be written create a control extender.  Here's the steps I went through to make the control.

  • Fixing a VS.NET 2008 Beta 2 ASP.NET Debugging Issue on Vista: "Strong name validation failed"

    I came across the following error while trying to debug an ASP.NET page in VS.NET 2008 tonight: "Unable to start debugging on the web server. Strong name validation failed."  I hadn't seen the error before but after spending a few seconds searching I came across the following steps that seem to have solved the problem.  I found the steps here.  Since this is documented I'm hoping it'll be resolved by the final release of VS.NET 2008. 

  • Video: Using the New ASP.NET ListView Control

    ASP.NET 3.5 introduces a new control called the ListView that allows developers to have 100% control over the HTML markup that is generated while still providing paging, inserting, updating, and deleting support. To me the ListView control is a nice blend between the GridView and Repeater controls with new features added.

  • Freeze ASP.NET GridView Headers by Creating Client-Side Extenders

    Lately I've been working on a pet project where I needed to freeze a GridView header so that it didn't move while the grid records were scrolled by an end user.  After searching the Web I came across a lot of "pure" CSS ways to freeze a header.  After researching them more they tend to rely on a lot of CSS hacks to do the job and require HTML to be structured in a custom way.  I also found a lot of custom GridView classes (another one here), and more.  Some of the solutions were really good while others seemed a bit over the top and required a lot of custom C# or VB.NET code just to do something as simple as freezing a header.  Freezing a header requires CSS and potentially JavaScript depending upon what needs done.  Regardless if CSS or JavaScript are used, these are client-side technologies of course.  I started to write my own derivative of the GridView class but quickly realized that it made more sense to use the standard GridView control and simply extend it from the client-side.  An example of what I was after is shown next:

  • Video: First Look at Visual Studio .NET 2008 and the LinqDataSource

    Visual Studio .NET 2008 provides many new features that will definitely enhance developer productivity.  In this video tutorial I provide an introductory look at VS.NET 2008 and show a few features such as multi-targeting, split view, and the LinqDataSource control.  In the video you'll see how to build an ASP.NET page that retrieves data from a data context object (created with the new LINQ to SQL designer) and binds it to various controls using the LinqDataSource control.

  • Using the ASP.NET AJAX ScriptMethodAttribute to Return XML Data

    Web Services provide a convenient way to pass data between AJAX applications and a server.  ASP.NET AJAX provides an excellent infrastructure for Web Service integration into AJAX applications and makes it all cross-browser through incorporating JSON into the mix.  While JSON is compact and a very good fit for AJAX applications, there may be times where it's easier or more convenient to pass back raw XML to an AJAX client for processing.  This is especially true if the browser provides robust XML parsing APIs like Internet Explorer 5+.  For example, you may have a Web Service that obtains RSS data and returns it as an XmlDocument or XmlElement object.

  • Updated: List of AJAX Automated Testing and Debugging Tools

    While there are a lot of testing tools out there to look for bugs, test a Website's scalability and perform unit tests, precious few seem to handle automating the testing of AJAX applications.  As a result, I wanted to start a list of tools that support automated testing of AJAX applications as well as debugging.  If you have other tools or applications you know of or something listed is out of date please add a comment to the blog and I'll get the information added/updated.

  • ASP.NET AJAX Health Care Toolkit Controls

    Patrick Long recently blogged about some new ASP.NET (and WinForms) controls released on CodePlex that are specific to the health care industry.  Several of the controls are AJAX-enabled (based upon the ASP.NET AJAX Extensions and the Toolkit) and as I went to download them I found an online demo available here.  I wish I would've had some of these controls on past health care projects I worked on.  An example of one of the more robust controls called MedicationGrid is shown below:

  • Windows Live Mobile Search V2 Released!

    The coolest program I have for my Windows Mobile phone (by far) is Windows Live Mobile Search V1.  I use it daily to check how traffic looks as I'm driving to downtown Phoenix.  V2 of the program has been released that adds the following new features (and I see there's even a beta for BlackBerry users...but iPhone users are out of luck):

  • Exchanging Binary Data with MTOM and Web Services

    In the distributed computing class I'm teaching this week we're covering a few topics related to the Web Service Enhancements V3 (WSE3).  One of the nice features of WSE3 (and WCF for that matter) is that it can be used to exchange binary data quite easily and in an efficient manner by using MTOM.  I put together a demo project that shows how MTOM can be used to exchange binary data between a client and a Web Service.

  • AJAX Rain

    I was reading through Dave Ward's blog at and came across a really cool AJAX Website he mentions called AJAX Rain.  It contains links to all kinds of cool AJAX scripts to do just about anything on the client.  It's definitely worth a look.

  • Coping with Click-Happy AJAX Application Users

    Users can be impatient while waiting for data to be returned to a page (I'll admit I'm guilty of this occasionally).  Fortunately, ASP.NET AJAX makes it easy to handle cases where impatient users continually click a refresh button (or other type of button) in an ASP.NET AJAX page causing extra load to be placed on your server.

  • Tracing in ASP.NET Application Classes

    I'm a big fan of tracing in .NET and use it in every project I work on since it's a great way to find out why things aren't working properly.  Tracing is especially useful when an application works in a test environment but not in production.  My good buddy Michael Palermo recently wrote a nice post on how to dynamically grab the name of a method when using tracing which is a great idea.  Mike's post made me think about a question I'm often asked: "How do you perform tracing in classes that don't have direct access to the ASP.NET TraceContext object?".

  • .NET 2.0 Distributed Application Programming Sample Code

    For those taking the Distributed Application Programming course this week with me (or anyone else who is interested), you can download some samples I put together below.  You'll find samples of creating and consuming Web Services, creating remoting clients and servers, using MSMQ and securing SOAP messages using WSE 3.0. 

  • Providing Visual Feedback in AJAX Applications

    I recently completed a new article for .NET Insight that discusses different ways to provide visual feedback to end users as asynchronous postback requests are made from AJAX-enabled pages.  The first technique discussed is the UpdateProgress control which is extremely simple to get going and doesn't require any knowledge of JavaScript out of the box.  The second technique uses the PageRequestManager client-side class to animate an UpdatePanel as a partial-page update occurs.  The article and associated code can be viewed at the following URL:

  • Working with UpdatePanel Properties

    Awhile back I released a video that discussed working with UpdatePanel control properties such as UpdateMode and ChildrenAsTriggers.  I've had several requests to make the code shown available and finally got around to doing that.  Those that are interested can download the code here.  If you'd like to watch the video you can view it at the link below.

  • Fixing Firefox Slowness with localhost on Vista (or XP with IPv6)

    I've been doing a lot of cross-browser testing lately for AJAX applications and Firefox has been killing me since it takes several seconds to load a single page when using localhost URLs on Windows Vista.  Internet Explorer 7 and Safari have been blazing fast with the same pages so I finally took the time to research the issue with Firefox and came across the following information: 

  • Scott Guthrie Speaking in Phoenix on Silverlight

    If you're available Wednesday, June 27th I highly recommend taking the time to attend Scott Guthrie's presentation.  If you've never heard Scott speak before he's extremely knowledgable and fun to listen to so I can guarantee you'll enjoy it.  Here's more information about the event (which is free) as well as a link to the registration site:

  • New Column on ASP.NET AJAX, Web Services/WCF and Silverlight

    Over the past month I've been writing articles for a new column in the .NET Insight and Web Design and Development Insight newsletters published by 1105 Media (a parent company for several media groups) that covers ASP.NET AJAX, XML Web Services/WCF, and Silverlight.  The articles are designed to be very focused so that you learn things quickly without having to scroll through pages and pages of text to learn a single concept.  The first 3 articles have been published and are available at the links below.  Four more articles are on the way.

  • Book: Professional ASP.NET 2.0 AJAX Released

    Matt Gibbs and I recently released a new book for WROX titled Professional ASP.NET 2.0 AJAX that covers all the topics you need to know to build robust ASP.NET AJAX applications.  Matt is a development manager for ASP.NET (and led the ASP.NET AJAX team) and I've had the opportunity to be involved with the product since the early alphas. We put a lot of work into the book so hopefully everyone finds it useful and educational....don't let the cover scare you away. :-) 

  • Video: Working with ASP.NET AJAX UpdatePanel Properties

    This video tutorial demonstrates the affect the UpdatePanel's UpdateMode and ChildrenAsTriggers properties have on updating a panel's content.  The video starts out by discussing the UpdateMode property and shows why you may want to know about it when using multiple UpdatePanel controls on a single page.  It then discusses the ChildrenAsTriggers property and shows how you can prevent child controls from updating their parent UpdatePanel control.  Examples of nesting UpdatePanel controls to provide a master-details style view of data is also shown.

  • Creating Custom ASP.NET Server Controls with Embedded JavaScript

    I did some consulting work recently for a company that had a lot of JavaScript embedded in pages that was used used to perform advanced client-side functionality and make AJAX calls back to the server.  The company needed additional team members to be able to contribute to the application without spending a lot of time learning client-side Web technologies.  One solution was to provide good documentation of the JavaScript objects and methods that could be called.  This still required some fundamental knowledge of JavaScript though.  The focus, however, seemed to be on getting other team members involved with learning C# and server-side technologies so that they could also build back-end code tiers rather than having everyone spend time learning JavaScript and other related client-side technologies such as CSS and DHTML/DOM.

  • JavaScript Intellisense and Documentation in VS.NET Orcas

    Microsoft's Betrand Le Roy just put together a great post on how to document JavaScript code in VS.NET Orcas.  By adding documentation comments, users of your script will get nice intellisense as they type and use JavaScript classes, methods, etc.  Nice stuff that we've all wanted for a long, long time.

  • The Power of Anonymous Methods in C#

    Anonymous methods are a new feature in C# 2.0 that allow you to hook an action directly to an event as opposed to having a separate event handler.  For example, when a user clicks a button and you need to pop-up a MessageBox, you could handle it the standard way with a delegate and an event handler, or you could hook the action to perform directly to the Click event using an anonymous method as shown next:

  • Simple ASP.NET 2.0 Tips and Tricks that You May (or may not) have Heard About

    ASP.NET 2.0 is an awesome framework for developing Web applications.  If you've worked with it for awhile then that's no secret.  It offers some great new features that you can implement with a minimal amount of code.  I wanted to start a list of some of the most simple (yet cool) things you could do with it that required little or no C#/VB.NET code.  If you have other suggestions add a comment and I'll update the list if the suggestion is a simple task that can be applied easily.

  • XSLT 2.0, XPath 2.0, XQuery and WSDL Support in XMLSpy 2007

    I've always been a fan of Altova's XMLSpy and have used it since it was first released.  Their release of XMLSpy 2007 doesn't disappoint as it adds support for several things that are of particular interest to me such as XSLT 2.0 and XPath 2.0, XQuery and enhanced WSDL editing.  It of course adds many more features which you can learn about at

  • Distributed Application Development with .NET 2.0

    I'm teaching Microsoft's .NET Distributed Application Development course this week in Phoenix and wanted to get some sample code I put together posted for everyone that is attending (and anyone else that is interested).  The code demonstrates asynchronous Web Services calls, MSMQ fundamentals, remoting through code and remoting through configuration files, using delegates with remoting, WSE 3 features, plus more. 

  • AJAX Hacker Attacks - Cross Site Request Forgery

    I was reading an article that was posted yesterday about various AJAX security vulnerabilities that was pretty interesting.  It documents how many AJAX frameworks allow GET requests to hi-jack JSON messages and process them as desired.  This is a big deal since any sensitive information included within a JSON message would be viewable to a clever CSRF (Cross Site Request Forgery) hacker. 

    Microsoft's Scott Guthrie cleared up the issue with regard to the ASP.NET AJAX framework today.  He wrote up a great post describing how the framework automatically disables GET requests by default (the UpdatePanel uses POST operations) and they add a special application/json content type header that is checked.  The architects of the ASP.NET AJAX framework did a great job thinking this through and ensuring that the framework prevented these types of attacks "out of the box".

  • Video: Calling Web Services Asynchronously with ASP.NET

    In this video tutorial I walk through the fundamentals of calling Web Services asynchronously from an ASP.NET page using the .NET 2.0 event driven model exposed by Web Service proxy objects.  There are several different options for calling Web Services asynchronously including polling, callbacks and wait handles, but the event driven model is quite easy to use and doesn't put as much pressure on the ASP.NET thread pool as the other options.

  • Binding Data to ASP.NET 2.0 Server Controls

    I'm teaching the ASP.NET 2.0 Programming class at Interface Technical Training this week and had a few people ask questions about how to embed controls such as a DropDownList into a DetailsView and use it while in edit mode.  The sample code below demonstrates one way of doing this without resorting to VB.NET or C# code and shows how the <%# Bind("FieldName") %> data binding expression can be used. 

  • ASP.NET AJAX and Sys.Debug

    ASP.NET includes tracing functionality that can be used to track different issues in an application.  It can be used to easily inspect errors that have occurred, check sessions IDs, cookie values, ViewState size, server variables plus a lot more. 

  • Video: Creating Web Services with the .NET Framework

    I've had several people email me and ask if I could do a video covering the fundamentals of creating a Web Service using the .NET framework.  Since I enjoy working with Web Services I decided to make some time and do that. 

    The video discusses how to create a Web Service from scratch but also discusses some of the pros and cons that you should know about.  For example, many people will return a DataSet from a Web Service.  While that works, it's not very interoperable with non-.NET clients since the generated WSDL will be quite vague about what the Web Service actually returns.  By creating custom types (classes) the WSDL can more accurately show a client exactly what they're going to get back.  I've also seen many people put all of the code for a Web Service into the Web Method.  That works, but you can achieve better code re-use by creating distinct layers for business and data functionality.  These concepts and a few others are discussed in the video. Other topics covered include consuming a Web Service from an ASP.NET Web Form.

  • Digging WPF

    I'm really digging WPF these days.  While there are a lot of cool technologies out there, WPF seems to offer a lot of promise for desktop apps or even apps running within Internet Explorer when .NET 3.0 is installed on the client. 

    Simon Allardice (one of the cool/smart people I work with at Interface Technical Training) showed me a great WPF application today from the British Library that allows people to inspect some really old books and documents.  I've always enjoyed Mozart's compositions (I enjoy writing music on an amateur scale) and have been checking out some of his manuscripts. 

  • Passing an Array of Values to a Stored Procedure in SQL Server 2005

    I've always dreaded handling the situation where I need to pass an array of values to a stored procedure.  Yeah...there are several ways to do it, but none of them are really pleasant IMHO.  I came across the following post by Jon Galloway that puts to use SQL Server 2005's XML capabilities to allow an XML fragment containing multiple values to be passed in as a single parameter and parsed.  Sure, there are pros and cons to this approach, but this technique makes reaching the end goal faster and easier than some of the alternatives.  Especially if you consider using the XML serialization capabilities in .NET to automatically serialize object properties to XML that is then passed to a sproc.

  • Live Search for Windows Mobile Released

    Microsoft recently released the final build of their awesome Live Search for Windows Mobile application.  It's probably the coolest and most useful application I have on my Mobile 5 phone since it does the following types of things:

  • Free ASP.NET 2.0 Webcasts and Labs

    Microsoft recently announced several different free Webcasts and virtual labs for those interested in learning to develop ASP.NET 2.0 applications.  Available tracks include ASP.NET 2.0 for existing ASP.NET developers, ASP.NET 2.0 for PHP developers, ASP.NET 2.0 for JSP developers and ASP.NET 2.0 for ColdFusion developers.  More details on the training can be found here.

  • WPF/E Now Includes a Downloader Feature

    WPF/E is getting better and better as new CTP releases come out.  The February CTP includes several nice additions including a new downloader that allows resources used by a WPF/E application to be downloaded dynamically.  As the resources are downloaded their progress can be monitored and displayed.  This can be useful when images, movies or music need to be downloaded "on the fly" so that the end user can see the progress of the download.  More information on the downloader API can be found at

  • Video: Creating an N-Layer ASP.NET Application (Updated)

    In this video tutorial I walk through the fundamentals of creating an N-Layer ASP.NET application.  What's "N-Layer" you ask?  N-Layer can be interpreted many different ways, but I generally use the term to mean separating presentation, business and data code into individual code layers.  Doing this allows code to be re-used throughout an application and prevents unnecessary clutter in ASP.NET code-behind classes.  This video covers creating presentation, business and data layers and also covers another layer I normally add to projects that I refer to as "Model".  The model layer contains data entity classes that are used to pass data between the different layers. 

    If you're currently embedding all of your code directly in ASP.NET pages, this video will help get you started on the road to recovery.  I'm kidding of course, but if you want to build more re-useable and maintainable applications you'll want to segregate your code into different layers at a minimum.  Other types of architectures can certainly be applied as well.

  • Video: Creating a Web Service with Windows Communication Foundation (WCF)

    Windows Communication Foundation (WCF) provides a robust framework that allows Web Services and .NET Remoting applications to be built and consumed using a consistent object model.  In this video tutorial I walk through the fundamentals of creating a WCF service exposed through HTTP and IIS.  Topics covered include defining a data contract using XSD schemas, generating data entity code using svcutil.exe, creating a service interface, implementing a service interface and consuming a service through a client-side proxy.

  • Speaking at the Dallas C# User Group on Feb. 1st (Updated)

    I'll be speaking at the Dallas C# User Group on February 1st on behalf of INETA and Interface Technical Training.  The topic I'll be discussing is Async Web Services in .NET 2.0 which includes a discussion of the pros and cons of async calls as well as several different techniques that can be used from callbacks and waithandles to the new event driven model.  If you're in the Dallas area and are interested in learning different techniques for calling Web Services asynchronously swing on by.

  • Video: Creating Custom Events and Delegates with C#

    It's no secret that events and delegates play a crucial role in the .NET framework.  Without them it would be hard to handle user input or notify other objects when an action occurs.  I get a lot of questions about events and delegates in classes I teach so I decided to put together a video that outlines the fundamentals of creating a custom class that exposes an event and a delegate.  The video also demonstrates how to create a custom  EventArgs class and how events can be consumed using C#.

comments powered by Disqus