August 2007 - Posts - More Wally - Wallace B. McClure

Giving people what they want, More Wally. This is the technical and personal blog site of
Wallace B. (Wally) McClure.

This Blog


Technical Sites


More Wally - Wallace B. McClure

This blog will have all kinds of posts about Wally McClure. In it, there will be tons of .NET and computer programming posts as well as Wally's views on life in general. As you might guess, this site and blog help you get More Wally in your life. What more could anyone want? iPhone, Android, Xamarin.iOS, Xamarin.Android, Mobile, HTML5, .NET, ADO.NET, ASP.NET, AJAX, jQuery, jQuery Mobile, ASP.NET AJAX, and Windows Azure............follow me on twitter at Wally

August 2007 - Posts

  • Visual Studio 2008 - Thursday August 16, 2008

    Javascript Intellisense of Web Services in an AJAX 1.0 Application (and How cool is the ASP.NET Team)

    I got an email last night about the code that I sent to the ASP.NET Team.  It ends up that you will not get Javascript Intellisense of Web Services in an AJAX 1.0 application with VS 2008.  You do get Javascript Intellisense of Javascript in an AJAX 1.0 application with VS 2008, however, you do not get it with the Web Service methods.  This is a subtle but important point.  You still get the javascript debugging with web services in an AJAX 1.0 application, just no javascript intellisense.

    On a related note, how cool is the ASP.NET Team?  Honestly, I never expected to hear back from them.  I realize that they have bigger issues to deal with.  I got a full explanation from Alex Gavrilov on the issue along with some comments from ScottGu.  Alex is a PM on the VWD team and Scott is.....well, Scott is Scott. 

    Huntsville Talk

    I think the talk went pretty well.  They had 36 people signed in.  For August and for the fact that this is a relatively small group, I was really happy that so many people had shown up.

    Javascript Debugging

    I can't talk about this feature enough.  This is a big deal.  I've been tracking down an issue all day.  John and I kept talking about an issue.  I thought he was calling a different method.  I finally set a breakpoint in a javascript oncompletion callback.   We hit the breakpoint and bang, I was able to see that he was calling a different method.  I went in, fixed the method, and it seems to have been resolved.  The Javascript Debugging feature will be huge.

  • Visual Studio 2008 - Tuesday August 14, 2008

    User Group Talk

    Not much to mention today.  I'm off to Huntsville, AL to speak to the .NET User Group there.


    ScottGu and ASP.NET Team coolness

    I posted some issues with the ASP.NET team regarding some strangeness with the Javascript intellisense.  Wow, three people from the ASP.NET team contacted me about this.  I finally got my code example out to them.  The shock is that they cared enough to ask.  I'm very impressed with them over this.


  • Vista finally ships!

    While Vista officially shipped at the end of January, 2007, I've had nothing but frustration with its reliability since I got it with my brand new laptop.  I've really had a bad experience with the product.  I've had random hangs of various applications and its been rather frustrating.  Honestly, the product felt very much like it was rushed out the door. Granted, I am a developer, but i couldn't go an hour without a hang/crash in IE.  Then, last week, like a bolt from the blue, MS released the new performance and compatibility updates. 

    I installed them and it was like night and day difference in my system.  I'm not quite sure what exactly this resolved, but since then, I haven't had any issues.  This has been awesome.  Its like Vista has finally shipped.

  • Visual Studio 2008 - Monday August 13, 2008


    ListView Control

    The ListView is a new control in ASP.NET 3.5.  It is designed as a replace from the .NET 1.0 Repeater, which has basically been the same ever since it was first introduced.   One of the complaints I have heard about the ListView in the previous betas is that the container had the <div> tag placed around it.  Well, I just checked and the <div> no longer exists as of beta2.  This is great.  Here is a simple example I wrote.

        <asp:ListView ID="ListView1" runat="server" ItemContainerID="tblData">
            <table border="1">
                <tbody runat="server" id="tblData"></tbody>
            <td><%# Eval("Name") %></td>
        <asp:DataPager ID="dpData" runat="server" PagedControlID="ListView1" PageSize="2" >
                <asp:nextpreviouspagerfield FirstPageText="First" LastPageText="Last"
                    NextPageText="Next" PreviousPageText="Previous"  />

    ListView and DataPager 

  • Visual Studio 2008 - Saturday August 11, 2007

    August CTP SDK is available.

    ** FYI, this isn't something I have done, obviously.  I thought it was interesting. **


    The Visual Studio 2008 SDK August 2007 CTP targets Visual Studio 2008 Beta 2 and is intended to let customers work with Visual Studio 2008 Beta 2 extensibility features.

    This CTP adds and updates the following features:

    1. This is the first release of the Visual Studio SDK that supports development of a custom tools environment that is based on the Visual Studio Shell (isolated mode). By using this SDK, developers can create their own instance of the tools environment and include custom branded elements such as splash screen, application title, and application icon. They can also create VSPackages to extend their own instance of the tools environment. For more information, search for "Visual Studio Shell" in Visual Studio SDK Help.

    2. New Samples

    2.1. Windows Presentation Framework (WPF) Designer Extensibility
    The IronPython sample is enriched with Windows Presentation Framework (WPF) designer extensibility. This sample provides guidance for customers who want to extend Visual Studio to integrate their .NET based languages with XAML and WPF Designer, which are introduced in Visual Studio 2008. This sample is intended to showcase these extensibility points. The sample shows how to write a basic WPF application for a managed proprietary language by using IronPython as an example. The sample also illustrates how to handle events by using EventBindingProvider.

    2.2. Windows Communications Framework (WCF) Extensibility
    There are three new samples that illustrate WCF extensibility. These samples demonstrate the following functionality:

    - Enumeration and manipulation of service references in a project.
    - Use of WSDL/policy import extensions, plus IWcfReceiveContextInformation.
    - Extending the "Discover" button with new drop-down items.

    2.3. Expression Evaluator
    Language integrators require an expression evaluator (EE) to work in the context of their programming language. We have created a new sample that shows how to write a basic EE for a managed proprietary language by using IronPython as an example.

    2.4. Data Designer Extensibility (DDEX)
    Five new Data Designer Extensibility (DDEX) samples illustrate implementing the following:

    - A very simple DDEX provider based on the .NET Framework Data Provider for SQL Server.
    - A DDEX provider based on the .NET Framework Data Provider for SQL Server that supports all common data design-time scenarios.
    - A DDEX provider based on the .NET Framework Data Provider for SQL Server with "finishing touches" that make the provider integrate well into the Visual Studio design-time experience.
    - A complete, registry-based DDEX provider based on the .NET Framework Data Provider for SQL Server.
    - A complete VSPackage-based DDEX provider based on the .NET Framework Data Provider for SQL Server.

    3. The Visual Studio Integration Package Wizard now supports the addition of an Integration Test project to the solution. The Integration Test project uses the Visual Studio integrated development environment (IDE) host type to launch and run tests inside Visual Studio. This feature lets you automate testing for your packages.

    4. Help Integration Wizard is now functional.

    5. Support for RANU (Run As Normal User) has been added for DSL Tools. You are no longer required to log in as an administrator, and on Windows Vista you are no longer required to elevate rights and permissions. All new DSL solutions that are unfolded by the wizard are configured to run as a normal user, and you can compile, execute, and debug them without administrative rights. There is no longer any machine-wide collateral damage from experimenting with the DSL Tools to create test languages that you eventually want to discard. A guide for migrating projects that were created with earlier versions of DSL Tools can be found in the folder \VisualStudioIntegration\Tools\DSLTools\.

    6. All branding is changed to the official Visual Studio 2008 release name (instead of Visual Studio Code Name "Orcas").
  • Visual Studio 2008 - Friday August 10, 2007


    I am working on a short LINQ sample for my presentation next week in Huntsville.  The code snippet:

    var query = from file in new System.IO.DirectoryInfo(@"C:\Windows").GetFiles() orderby file.CreationTime descending where file.Extension == ".exe" select file;
    gvData.DataSource = query;

    In this example, a query is run against the System.IO.DirectoryInfo().GetFiles() method.  The resulting data is bound to the GridView.

    LINQ Output

    Thanks to Jim Wooley for the help on this.

    Javascript XML Comments

    You get Javascript Intellisense by default in Visual Studio 2008.  However, it is possible to increase the amount of information that it currently displays.  You can increase the information by providing xml comments to the javascript functions.  Below, in the method AddNumbers, I added summary and parameter information.  A couple of things that I found out about this:

    • The enhanced intellisense only seems to work if the method you are calling is in a different file.  I hope that this is something I am doing wrong or a limitation of the beta.
    • The xml comments must be within the method.  I thought they needed to be between the method and the opening curly bracket, but I was wrong there.

    ScriptTest2.js contents:

    function AddNumbers(a , b)
    /// <summary>
    /// Adds 2 numbers.
    /// </summary>
    /// <param name="a" type="numeric" >
    /// Numeric
    /// </param>
    /// <param name="b" type="numeric" >
    /// Numeric
    /// </param>
    return ( a + b );

    ScriptTest.js contents:

    /// <reference path="ScriptTest2.js" />
    function Add2Numbers(a, b )
    var x = AddNumbers(a, b)
    return (x);

    The intellisense results below

    Javascript intellisense

    It sure is awesome to see the the information on the datatypes be displayed.

  • Visual Studio 2008 - Thursday August 9, 2008

    Nested Master Pages

    As I was working up my talk on Visual Studio 2008 and started working on my Nested Master Pages.  Oh my gosh, it actually works. 

    I created this parent master page

     Parent Master Page

    I then created this child master page

    Child Master page 

    And then the result was this page

    Resulting Viewable page

    You might not be able to see it, but I can edit the child page just like I thought I could.  While I don't use Master Pages in any major way, I definitely think this is a really cool WOW feature.

    To put this into a simple display of information, here are the simple versions of the various files.

    MasterPage Parent file:

    <%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPageParentSimple.master.cs" Inherits="MasterPageParentSimple" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

    <html xmlns="">
    <head runat="server">
        <title>Untitled Page</title>
        <asp:ContentPlaceHolder id="head" runat="server">
        <form id="form1" runat="server">
            Simple Parent Master Page.<br />
            <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">

    MasterPage Child file:

     <%@ Master Language="C#" MasterPageFile="~/MasterPageParentSimple.master" AutoEventWireup="false" CodeFile="MasterPageChildSimple.master.cs" Inherits="MasterPageChildSimple" %>

    <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
        Simple Child Master Page<br />
        <asp:ContentPlaceHolder ID="Content3" runat="server">

    ASPX file:

    <%@ Page Language="C#" MasterPageFile="~/MasterPageChildSimple.master" AutoEventWireup="true" CodeFile="DefaultSimpleMasterPageExample.aspx.cs" Inherits="DefaultSimpleMasterPageExample" Title="Untitled Page" %>

    <asp:Content ID="Content1" ContentPlaceHolderID="Content3" Runat="Server">
        this is some basic content.

    IDE View:

    IDE Output 

    Resulting output:

    Output of the nested master pages.


    Javascript Intellisense

    While it doesn't seem to solve every problem, calling "devenv /resetsettings" does seem to resolve some of the issues that I am having with Javascript Intellisense.  It might be worth giving it a try to see if it resolves your problems.

  • Visual Studio 2008 - Wednesday August 8, 2008

    CSS Property Manager

    Check out ScottGu's blog entry on the CSS features of VS 2008: I started reading through it and looking at it.  Where is the CSS Manager?  Well, its buried in the menu items. 

    • Open an aspx page with a css file linked to it.
    • Go to Format -> CSS Styles -> Manage Styles & voila......


    CSS Intellisense

    If you have a CSS file linked to an aspx page, you get Intellisense for CSS on the server side.  This is awesome

    CSS Intellisense

  • Visual Studio 2008 - Tuesday August 6, 2008


    Alex Hoffman has a series that he is working on called Adventures in .NET 3.5

    Huntsville talk on August 14, 2007

    I am doing a talk on .NET 3.5 and Visual Studio 2008 in Huntsville, AL on August 14, 2007.  How do you talk about .NET 3.5 and Visual Studio 2008 in 1.5 hours?  What do you choose to say and not say?  I have decided to focus on the the following items:

    • LINQ
    • ASP.NET improvements
      • ListView.
      • DataPager.
    • IDE Improvements
      • Multi-targeting.
      • Nested Master pages.
      • Improved Intellisense.
      • Design Surface.
      • Debugging Javascript
    • Language Improvements
    • Personal Experiences
    • Running ASP.NET 2.0 in Visual Studio 2008

    I'm sure I'll be adding other things, but these are the things I am currently hitting on.

    I have started from a talk that Joe Healy did.  I've added content from Scott Guthrie and the weblog of the web tools team and then mixed in my own personal experiences.  Thanks to Joe, Scott, the web tools team, and everyone else for helping make this successful.

  • Visual Studio 2008 - Monday August 6, 2007

    Solving a Problem

    I want to follow up on the solution from the problem over the weekend. This is a production application. We were having a data type problem on the client and we honestly had no idea what was going on. There was more issue than I mentioned yesterday. I spent some time today on this application. I am incharge of the database, the web services, and the business logic while John is working on the UI. BTW, the UI code is not as simple as some people might think. Because I was able to step through the javascript, I was able to see what was going on and able to fix it. I shudder to think of how I would have fixed this under Visual Studio 2005 without a lot of document.write(.....) statements in the code. I am glad that I went through and upgraded the app on my development system.

    Javascript Intellisense

    It looks like I found something that can hang up the javascript intellisense.  We are using the prototype.js library.  I started noticing this type of error in the IDE.

    Error      10           Error updating JScript IntelliSense: C:\SVN\HappyMappy\website\scripts\prototype.js: Object expected @ 31:4        C:\SVN\HappyMappy\website\coolscripts\blah.js     1              1              C:\...\website\

    This would seem to indicate a problem in the prototype.js file which we are also using.  Why this stops the javascript intellisense, I don't know.  I googled looking for an answer, I found that other folks seem to have similar problems with the prototype.js file and javascript intellisense in previous betas of Visual Studio 2008.


    Adding references in Javascript Intellisense

    Ok, so I am sure that people know about the javascript intellisense feature now.  You can add a reference through

    /// <reference path="blah.js" />

    You also can get a reference by having things setup in the ScriptManager.  Also, you can do this:

    /// <reference path="Page.aspx" /> 

    This could be helpful if you are in a .js file that is added into a page and you want to reference something else on that page, such as a web service in the ScriptManager. And yes, i agree that it seems like a backwards way to do things..........

    Javascript Breakpoints

    I had the following line in some javascript code

    var SelectedOffice = $get("<%=ActiveOffice.ClientID%>").value; // if this isn't exact, it is fairly close.

    I was going through a debug session.  I wanted to set a breakpoint on that line, but I couldn't.  I scratched my head on this.  What is so special about that line?!?  I could set a breakpoint in the debug session in the dynamic page, but the source page, that didn't seem to work correctly.  Well, it ends up that because of <% %> characters, no break points can be set on that line in the source view.  You can do something like this:

    var ClientId = "<%=ActiveOffice.ClientID%>";
    var SelectedOffice = $get(ClientId).value; // a break point can be set on this line.

    I'd like to thank Scott Guthrie for pointing this out to me.

    Creating an ASP.NET 3.5 AJAX Project

    Ok, I want to create an ASP.NET 3.5 AJAX Project in Visual Studio 2008.  How do I do that?  Its easy.  AJAX is now integrated into the basic ASP.NET Project.

  • What is the world coming to?!?

    What is the world coming to?!?  This afternoon, Wally McClure, one of the most ardant Mac haters in the world at one time..................went out and bought an Apple MacBook.  I have a white MacBook with a 2.16 GHz Intel Core 2 Duo, 2 gigs of ram, and 120 gigs of hard disk space.

    Why do I say that this is such a big deal?  In my 3.5 years in corporate IT at Coca-Cola (1992 - 1995), I was a part of the Apple Cider project.  The Apple Cider project was an attempt to get rid of Macs that did not have a business reason for being there.  The cost of supporting the Mac platform was significant vs. the PC platform on a per capita basis at the time.  At the time, this was the right move.  Macs didn't communicate well within the Coca-Cola infrastructure at the time, which consisted of Token Ring networks, Novell NetWare, IBM AS/400s, and we were just getting into Oracle Databases communicating over IPX/SPX and TCP/IP.  Macs just didn't work real well in that environment.  At the time, Apple's market share was gradually being eroded and their financial results were getting worse.  Apple reached a low point in the late 1990s.  I figured IBM would eventually buy them and that would be the end of them.  Fast forward 15 years and things are in different shape.  Apple's market share is still relatively small (5-6%), but their financials are really good.  I doubt that their market share will ever increase significantly, however, Macs remain in the market place.  I felt now was a good time to go ahead and see how the other half lives.  I'll be interested to see how things work and how much I learn.  I hope that the Microsoft Dynamic Language Runtime (DLR) becomes a reality soon.

    Posted Aug 04 2007, 06:32 PM by wallym with 1 comment(s)
    Filed under: , ,
  • Visual Studio 2008 - Saturday August 4, 2008

    Graphical Web Designer
    IDE Split View

    Here is the issue that I mentioned yesterday with regards to the designer. If you are in the split view and you click on a button, you would expect to go to the server side click event of the button.  Instead of going to the default event, you end up in the Page_Load event.  This only happens in the split view.  If you are in design view only, you get the expected behavior of going to the click event of the button.  This has been reported and logged.


    Javascript Debugging

    Javascript Debugging with a Visualizer
    We have been having a problem with some web service code I wrote (no jokes).  The code is being called by a web client, so its AJAX.  I was getting reports that the code was just generating a server side error.  I set some breakpoints on the server, but the server code was never getting hit.  I was racking my head as to what was happening.  Then it hit me, I set a breakpoint in the javascript and hit F5 to start debugging.  I found the error pretty quickly, an incorrect datatype was being passed.  So, there you have it, Visual Studio 2008 made my life better today.


    Javascript during a build process

    When you build a web application, it looks like Visual Studio 2008 looks into the javascript code on a web page and .js files and checks for anything that looks silly.  While it reports some things as warnings which don't keep things from running, I think this is a really good feature.  It can catch when we're doing something stupid.

  • Visual Studio 2008 - Friday August 3, 2007

    Master Pages

    There is a new default master page.  The new default masterpage has content place holders in the head as well as in the body.

    <%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
    DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    html xmlns="">
    head runat="server">
    <title>Untitled Page</title>
    <asp:ContentPlaceHolder id="head" runat="server">
        <form id="form1" runat="server">
            <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">


    Obviously, I don’t know the specific reasoning behind it.  However, it looks like it would allow content in the head of a page to be individualized for a page.  Cool trick.

    Visual Studio 2008 Whitepaper

    If you want to get the lowdown on Visual Studio 2008 straight from the guys that are writing it, check out the link below to Visual Studio 2008 Whitepaper.  I ran across it while I was looking for other information.

    Source Control

    I solved my problems with Visual Source Safe yesterday.  I forgot to mention that I also have Subversion working perfect.  How?  Well, we use RapidSVN for our main project that John and I both work on.  There is no integration story there.  RapidSVN doesn’t plug into Visual Studio.  So, it all works and it works great.  The key part of the story to me is that the project files are compatible.  That’s the real key.

    Windows 2008 Server

    I downloaded the express tools and installed them onto my VPC running the June CTP of Windows 2008.  I installed Visual C# Express and Web Developer Express Beta2 onto the product.  The installs seemed to go well.  I updated my code from the recent podcast and it worked.  Sorry, but I was too lazy to sit through an entire install of VS.NET  into a VPC session.  To get the express versions of VS.NET 2008, go to:

    I opened my project from the ASP.NET Podcast on Building an IIS7 HttpModule.  Everything ran just like I expected it to.

    .NET 2.0 Apps under Visual Studio 2008

    Ok, this post continues to be the bible on how to get things working:   I find that I keep going back to it over and over.  It looks like there are several places where Visual Studio incorrectly identifies a .NET 2.0 Assembly as a .NET 3.5 Assembly.  Remember, it is beta.

    JSON Serializer

    I download and extracted the AJAX Control Toolkit for .NET 3.5 this morning.  I loaded it up into Visual Studio 2008 and compiled it.  There are four warnings in it that are all the same.  These warnings are: Warning: 'System.Web.Script.Serialization.JavaScriptSerializer.JavaScriptSerializer()' is obsolete: 'The recommended alternative is System.Runtime.Serialization.DataContractJsonSerializer.'   The interesting thing is NOT the bug.  The interesting part is that the new JSON Serializer is in the product.  I had heard about this a long time ago that the JSON 1.0 Serializer was a temporary solution and that there was a better JSON Serializer coming from within the WCF team.  I am guessing that this is it.  Its great that using the original serializer results in code that is marked as obsolete..  That way, you don't get errors that things are broken when they really aren't and you get the gentile nudge to move your code forward.

    Design & Source ViewsDesign and Source view

    The Design/source views are not automatically kept in sync.  The Design view changes are sent to the source view, however, the changes in the source view are not automatically kept in sync in the design view.  However, there is a small label you press to update the design view after changes in the source view.  The label alerts you when things are out of sync.


    On Thursday night, I posted to one of the ASPInsider lists about a bug I think I have found when the split (design and source) view is open.  Within a couple of hours, I had an email from PM in charge of VWD.  Its awesome to see that there are people in this world that really care about their products and have that amount of energy.  I'll post about this after I get more info.


  • Visual Studio 2008 - Thursday August 2, 2008

    Given yesterday's problem with VSS, I felt like it was important to find a solution.  I found a prerelease update to Visual SourceSafe 2005 that is supposed to get VSS to work with Visual Studio 2008 Beta2.  I downloaded it, but it doesn't resolve my problems at this point.  I *bumped* an email about this within the ASPInsiders.  Scott Guthrie was kind enough to grab it and send it onto some others.  Hopefully, something will come back about this.  BTW, I can't say enough kind things about ScottGu.  He has so much energy for the community!  I'd like to develop this application with VS.NET 2k8, but if I can't get some simple source control working, and I am not going to deal with TFS, for a small project running on my laptop, I'll have to go back to VS.NET 2k5 with that project.  Its not a big deal, but does throw a wrench in the works.  Honestly, any type of source control would do.  I just need versioning and to have it to work

    Here is the url to the update for VSS 2005:

    There is a note on the bottom of the download page that you will need to register the file tdnamespaceextension.dll.  When I registered that dll, some of the error messages in VS.NET 2k8 went away, but I am still unable to bind a project to a database in VSS.

    Finally, resolution on the subject.  The problem seems to be a security issue related to Vista and VS.NET 2k8 that is particular to my laptop.  The problem seems to be that the VSS database was within the "Program Files\Microsoft Visual SourceSafe" directory.  When I changed the security settings on the local Users group to allow all users access to the rights.dat file, the problem went away.  Life is much better.

    I am working on my talk on .NET 3.5 / Visual Studio 2008 in Huntsville, AL on August 14th.  More info to come about this later. 

    I started my first debug session today.  I hit F5, and up posts a data collector window.  I was thinking, "wtf is that?" Apparently, there is much more profiling and collecting of application performance in Visual Studio 2008.   This is good stuff.  After all, there are too many poorly performing applications out their in the world.  Oh the humanity.  Start reading about application profiling here:

    Profiled data after debugging. 

    When you go into the debugger in VS.NET 2008 when hitting a web application, you get a list of all the files loaded by that page.  You can go into the files and set breakpoints in the javascript.  This is great.

    Script Document

  • Gym Report - Thursday August 2, 2007

    I've really been pushing myself the last few weeks in the gym.  I've been 6 days a week.  At least half of the sessions have been 30 minute sessions on the cross training machine at over 600 calories per session.  Today is more of the same.  I did 670 calories today.  Wow, my body hurts. 
    Posted Aug 02 2007, 09:47 PM by wallym with no comments
    Filed under: ,
More Posts « Previous page - Next page »
2006 - Wallace B. McClure
Powered by Community Server (Non-Commercial Edition), by Telligent Systems