About the Author

Adam joined InterKnowlogy in 2004 and oversees the Application Development Practice. He is an accomplished software developer, C# MVP, author, teacher and speaker with over twelve years of experience designing, developing and leading large-scale mission critical software projects. Adam is also very active in the development community where he is a member of Microsoft’s UI Frameworks Council, teaches classes at UCSD Extension, serves on the Board of Directors for the San Diego .NET Developers Group, and is a renowned speaker at user groups and conferences.

New InRoads to Internet Access

The biggest problem with wireless internet access (either WIFI or cellular) is finding a good connection. Sure your local coffee shop (woo hoo Starbucks) has a connection but what about other locations. This is where cellular comes into play. I have an awesome verizon card built into my laptop and for the most part no matter where I am I can access the Internet. So with these two solutions as long as I can find a hot spot or get cellular service I am good. But what about areas that don’t have a hot spot or cellular service? As I read more and more about how advances in technology and the internet are helping us I always think about areas in the world that don’t have all of this infrastructure in place and what they can do. I am glad to see that other people are thinking the same way. I was very excited to see that Japan launched a new satellite that has the capability to provide satellite based internet access anywhere in the world. The potential for this technology is enormous enabling anyone in the world to be connected. Take away the geek aspect of this and look at the potential for the medical industry for instance. A doctor in say the back country of Nairobi can consult with doctors anywhere in the world to assist him in diagnosing a patient or even better in an actual surgery. It is advances like this that make working in the technology business worthwhile.

My Day with Form Regions and Custom Message Classes in Outlook 2007

I was creating a form region in Outlook 2007 today for appointments and I wanted to limit the form from showing up with every appointment. I read that you could associate the form region with a custom message class and once you did this the form region would only show up for messages of that type. So with that information in hand I marched through the New Outlook Form Region Wizard (see Figures 1–4) in Visual Studio 2008. I was trying to create an adjoining form region that would show up on the bottom of the appointment screen so when I got to “Select the form region you want to create” step (see Figure 2) I selected Adjoining and continued to “Identify Message Class that will show this form” step (see Figure 4) where I added my custom message class “IPM.Appointment.MyAppointment” and finished. After adding some content to my form region I started to debug my add-in. This is when the trouble began. I could not find my custom form anywhere. Normally you would go to File>New>Choose Forms… the form would be there (see Figure 5) ready for you to choose and enter data in. Not in this case. After a long process I finally figured out that a custom message class will only work with replacement and replace-all form regions and not adjoining which I was using. The note in the SDK (see Figure 6) hints at this but it doesn’t come out and say “It will only work with these types”.

FormRegionWizardStep1

Figure 1 – Selecting how to create your form region

FormRegionWizardStep 2

Figure 2 – Choosing the form region type

FormRegionWizardStep 3

Figure 3 – Naming your form region

FormRegionWizardStep 4

Figure 4 – Determining Message class to use

Choosing form

Figure 5 – Selecting form in Outlook

Note in sdk

Figure 6 – Note in SDK

Code Length Guidelines in Visual Studio

If you have ever presented or written an article you probably have ran across a situation where the code you have written contains lines that are to long and you need to modify them to fit on the screen or page. This can be a real pain especially when you write code using a wide screen monitor with a high resolution. Well for the past few years I have just lived with this issue until I ran across this really cool blog entry Guidelines – A hidden feature for the Visual Studio Editor by Sara Ford that details how to modify your registry setting to get guidelines in the Visual Studio editor. Once I modified my registry setting, lines showed up in the editor giving me a visual clue of how long my code lines were. At last no more code hacking! For those of you who don’t know who Sara Ford is she is a prolific blogger of all things Visual Studio related and a great source for all kinds of little trinkets on the subject.

ASP.NET Ajax Controls Book Coming Soon

Over the last year Joel Rumerman and I have been working on a book for Addison-Wesley that is part of the Microsoft’s .NET Development Series that Addison-Wesley publishes. It has been a long haul but the fruits of our labor are starting to take hold. The book is entitled Essential ASP.NET Ajax Controls and covers both the JavaScript and .NET side of creating controls in ASP.NET Ajax and the Ajax Control Toolkit. The book has been a blast to write and we hope you will enjoy it. The topic is something Joel and I have been involved with since the early Alpha as part of the ATLAS First Access program that began in early 2006.

0321514440_MED

Visual Studio 2008 Peformance Profiler

The Visual Studio Performance Profiler in Visual Studio 2008 is leaps and bounds better than it’s predecessor but as always finding any information on Beta technology is not the easiest thing to do. To help out I have included a few blog entries that are helping me understand what VS 2008 has to offer and a few that cover some background information as well.

This first blog entitled Solving WPF Performance Problems: Step 1 is a great blog by Tim Cahill that you can use to get started with. It covers VS 2005 but included a few good tidbits including a link to a website that contains the debug symbols for the Microsoft DLLs. Tim also has another blog Profiling WPF Applications from the Command Line that describes how to use the command line with the profiler. The examples cover startup and already running application scenarios which are now supported in the UI in VS 2008.

Ian Hu has a series of blog entries that cover the profiler in VS 2008 showing off a lot of the cool new features that make this profiler the best yet from Microsoft.

Collecting performance counter information with the Visual Studio Team System profiler

Pinpoint a performance issue using hotpath in Visual Studio 2008

The New Developer Menu in Visual Studio Team System

The Visual Studio Profiler Data Collection Control Part 1: Excluding Application Startup Time

Comparing performance reports with the Visual Studio Team System Profiler

External JavaScript Files, Intellisense in VS2008 and ASP.NET Ajax

As most of you know by now Microsoft has added JavaScript Intellisenseto Visual Studio 2008 which makes programming in JavaScript a lot better but most of the samples have everything in the same page. What I wanted to do is have an external script file for my page that I could add all of my JavaScript code to and have a clear separation between my UI and my code. To add to this, I was using ASP.NET Ajax and I wanted to use the features of the framework and reference web service proxies and have intellisense appear for everything while I was coding. Here are the steps I went through in order to get all of this to work.

1. Add the ScriptManager (or ScriptManagerProxy) to your page

The first thing you need to do is add the ScriptManager or ScriptManagerProxy to your page. This will be the main registration mechanism for you as you add script files and web services for your page to use.

<%@ Page Language=”C#” AutoEventWireup=”true” CodeBehind=”Default.aspx.cs” Inherits=”JavaScriptIntellisenseDemo._Default” %>

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd“>

<html xmlns=”http://www.w3.org/1999/xhtml” >
<head runat=”server”>
    <title>Untitled Page</title>
</head>
<body>
    <form id=”form1″ runat=”server”>
    <div>
        <asp:ScriptManager ID=”ScriptManager1″ runat=”server”>
        </asp:ScriptManager> 
    </div>
    </form>
</body>
</html>

2. Create an External JavaScript File and reference your page

This is the key to getting intellisense to work with your JavaScript file. What happens once you do this is all of the functionality of the ASP.NET Ajax framework appears in intellisense. You can add this reference statement two way (1) by typing it and (2) by dragging the aspx file onto the script file as you have it open in the editor.

/// <reference path=”Default.aspx” />

Working with Web Service Proxies and Additional Script Files

Now that you have your JavaScript file associated with your page working with web services and additional script files is easy. If you want to work with a web service, just add the service to the services collection in the ScriptManager.


<asp:ScriptManager ID=”ScriptManager1″ runat=”server”>
     <Services>
         <asp:ServiceReference Path=”~/Service1.svc” />
     </Services>
</asp:ScriptManager>

Now in your JavaScript file you access the proxy will full intellisense.

Javascript_intellisense

Another common situation you run into is needing functionality that is contained in another JavaScript file. All that you have to do here is register that JavaScript file (common.js in our case) with the ScriptManager and it will become available (for intellisense) in your script file for your page (default.js).

ScriptManager Registration


<asp:ScriptManager ID=”ScriptManager1″ runat=”server”>
    <Scripts>
        <asp:ScriptReference Path=”~/default.js” />
        <asp:ScriptReference Path=”~/common.js” />
    </Scripts>
    <Services>
        <asp:ServiceReference Path=”~/Service1.svc” />
    </Services>
</asp:ScriptManager>

JavaScript File Fragment for Reference

//common.js
function formatErrorMessage(message)
{
    return “The following error has occured during your web service call\n ” + message;
}

Accessing method in default.js

Javascript_intellisense_2

Summary

In this approach we use the ScriptManager for two purposes (1) to register our scripts and web service proxies and (2) to combine all of our external references for our script file that supports our page. This is just one of many approaches that are possible but the thing I like about this approach is that is works off of things I already have to do for my page to work anyway. One thing to note is that you will probably have to compile as you add new things to the ScriptManger. It seems that this is the only way to get intellisense updated.

Introduction to REST based Communication in Visual Studio 2008 using ASP.NET and WCF

Here are the slides and demo code for my presentation on REST based communication. The code is based on Visual Studio 2008 Beta 2 and the ATLAS Control Toolkit for .NET 3.5.

File Attachment: An Introduction to REST based Communication in Visual Studio 2008 using ASP.NET Ajax and WCF.zip (1243 KB)

File Attachment: AjaxWebServicesDemo.zip (649 KB)

Error adding the ASP.NET AJAX Control Toolkit to toolbar in Orcas Beta 1

I have spent a few hours trying to figure this out and finally got this to work. When I first tried to add the toolkit DLL to the toolbar to get the controls added I got the error below.

Ajax toolkit error message

I tried to google (I mean Live Search ) to find the result and could not find any real solutions so now I started hacking.

I tried to add a reference to the file AjaxControlToolkit.dll from the C:\Program Files\Microsoft ASP.NET\ASP.NET Ajax Control Toolkit\SampleWebSite\Bin directory (this is where I installed my toolkit). Still I had no luck. I then noticed that the System.Web.Extension dll was not in my references (this seems to be the default in Orcas right now) so I went to add it. I was now faced with a decision on what version of this dll to use. I went ahead and chose the newest version 2.0.0.0 and went for it. I was then able to add the control toolkit to the toolbox.

There are a few things to keep in mind as you work with the toolkit.

  1. Sometimes the old version of the System.Web.Extensions dll will appear in the assemblies section of your web.config. If so just remove it since you would have two entries in this case since the 2.0 version is added automatically by the Web template in Orcas.
  2. Once this is done the toolbox will have the controls for each project you create but you will still have to references the DLLs in your project.