October 2008 - Posts - More Wally - Wallace B. McClure
in

MoreWally.com

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

This Blog

Syndication

News

Please goy buy 3-4 copies of my book on MonoTouch titled "Professional Android Programming with Mono for Android for .NET/C# Developers." They make great gifts all year round. Plus, I get about $.25 when you buy a copy.

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, MonoTouch, MonoDroid, Mobile, HTML5, .NET, ADO.NET, ASP.NET, AJAX, jQuery, jQuery Mobile, ASP.NET AJAX, and Windows Azure............follow me on twitter at Wally

October 2008 - Posts

  • Columbus, OH Wrap up

    I was in Columbus, OH on Thursday 10/23.  I spoke at a couple of customer locations. Thanks to the MS folks (Mark Harris and Brian Prince) for setting that up.  I left columbus about 6:45 pm and got in 12:30 am or so.  I'm a little blurry eyed today

  • Dayton Ohio Wrapup

    I was in Dayton, OH on Wednesday to speak on an Intro to ASP.NET AJAX.  I spoke there and then hung out for a little while talking everything from politics to ASP.NET futures.  Good times.  Thanks to my buddy Phil Japiske for coming up from Cincy!

  • Findlay, OH User Group

     I'll be speaking at the Findaly, OH user group on Tuesday (10/21) on the ASP.NET AJAX UpdatePanel.  If you are in the area, please come by.

  • Northwest Ohio User Group

     I'm up in Toledo/Perrysburg, OH.  I'll be speaking at the Northwest Ohio .NET User Group this evening.  I'll be speaking on the ASP.NET AJAX UpdatePanel this evening.

  • FedEx Kinko's Business Cards Suck

    I realized last week that I needed new business cards. I had our admin assistant work on getting me a new set of business cards.  Last time, she worked some through FedEx Kinko's and it worked out fairly well.  This time, not so much.  First off, they wanted to redesign the cards, second they increased the font sizes of the text, third, they redid our graphic.  By the time I received them at 11:30 pm on Friday night, it was a disaster.  I refused to take them on my business trip.  They looked like they had been designed by the neighbor's kid that was 20/200 nearsighted.  The result is very unprofessional looking.  I had our admin assistant go to complain this week while I was gone.  FedEx Kinko's refused to redo the work, admit anything was wrong with the cards, or to do anything to resolve the situation.  What a bunch of losers.  This was a really piss poor job.  I'm never going to have them print anything that I can't control 100% again.  I have made mistakes in the past and I've worked with customers to resolve these issues. FedEx Kinko's has not done so in this situation and I am very disappointed.

    sucky business cards from FedEx

  • Script Minimization example with ASP.NET AJAX

    I wrote an example today to minimize the script that is sent to the browser when using ASP.NET AJAX and also the ajax control toolkit.  It seems to work really sell.  Firebug is reporting an improvement of going from 14 files downloaded to 6.  I think that's pretty good.  Look for a podcast on this soon.

  • .NET 3.5 SP1 version of the AJAX Control Toolkit

    I didn't catch that there was a new version of the Control Toolkit.  Well, there is.

    http://www.codeplex.com/AjaxControlToolkit/Release/ProjectReleases.aspx?ReleaseId=16488

  • ScriptReferenceProfiler

     I found this control while listening to one of Bertrand's videos on Script Combining in ASP.NET 3.5 SP1.  Basically, this control tells you what scripts are being downloaded by the page.  This is absolutely cool.  Here is what the output of the script reference profiler.

    script reference profiler

     The problem I found is how do you setup the web.config?  Well, here's what I put into the web.config <controls> section:

    <add tagPrefix="ms" namespace="ScriptReferenceProfiler" assembly="ScriptReferenceProfiler, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null" />

     

    http://www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=13356

  • renderAllHiddenFieldsAtTopOfForm with .NET 3.5 Service Pack 1

    There is a new attribute in the web.config for  <pages>.  The renderAllHiddenFieldsAtTopOfForm value (boolean) determines whether or not hidden fields are included at the top of a form or not.  This can help resolve issues with a form not completely loading and one of those crazy users pushing a button that does a form submission.  Very cool.

  • ASP.NET Podcast Show #125 - Routing with Webforms

    Subscribe to All!

    Subscribe to WMV.

    Subscribe to M4V (iPod).

    Subscribe to MP3.

    Download WMV.

    Download M4V (iPod).

    Download MP3.

    Show Notes:

    • Not just for MVC.
    • Available with .NET 3.5 SP1.
    • System.Web.Routing.
    • Web.config.
    • Global.asax.
    • Routing class.
    • Security.
    • Output page.

    Source Code:

    Web.config entry:

    <httpModules>
    .......
    <add name="Routing" type="System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    </httpModules>

    Global.asax:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.Routing;
    using System.Web.Security;
    using System.Web.SessionState;

    .................

            void Application_Start(object sender, EventArgs e)
            {
                // Code that runs on application startup
                string strUrlPat = String.Empty;
                Route rteRoute, rte2;

                strUrlPat = "{controller}/{action}/{nameid}";

                rteRoute = new System.Web.Routing.Route(strUrlPat, new DisplayHandler());
                System.Web.Routing.RouteTable.Routes.Add(rteRoute);

                strUrlPat = "Book/{ISBNid}";
                rte2 = new Route(strUrlPat, new BookHandler());
                RouteTable.Routes.Add(rte2);

            }

    Handler class:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Security;
    using System.Web;
    using System.Web.Compilation;
    using System.Web.Routing;
    using System.Web.Security;
    using System.Web.UI;

    namespace WAP
    {
        public class DisplayHandler : IRouteHandler
        {
            public IHttpHandler GetHttpHandler(RequestContext rc)
            {
                var routingPage = __LongTerm__ typeof(Page));
                routingPage.ControllerValue = rc.RouteData.Values["controller"] as string;
                routingPage.ActionValue = rc.RouteData.Values["action"] as string;
                routingPage.ProductValue = rc.RouteData.Values["nameid"] as string;
                return (routingPage);
            }
        }

        public class BookHandler : IRouteHandler
        {
            public IHttpHandler GetHttpHandler(RequestContext rc)
            {
                string VirtualPath = "~/Routing/Books.aspx";
                if (!UrlAuthorizationModule.CheckUrlAccessForPrincipal(VirtualPath,
                    rc.HttpContext.User,
                    rc.HttpContext.Request.HttpMethod))
                    throw (new SecurityException());
                var routingPage = (WAP.Routing.Books)BuildManager.CreateInstanceFromVirtualPath(VirtualPath, typeof(Page));
                routingPage.ISBNNumber = rc.RouteData.Values["ISBNid"] as string;
                return (routingPage);
            }
        }
    }

    Codebehind page:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;

    namespace WAP.Routing
    {
        public partial class RoutingExample : System.Web.UI.Page
        {
            public string ControllerValue { get; set; }
            public string ActionValue { get; set; }
            public string ProductValue { get; set; }
            protected void Page_Load(object sender, EventArgs e)
            {
                if (!Page.IsPostBack)
                {
                    lblController.Text = ControllerValue;
                    lblAction.Text = ActionValue;
                    lblProduct.Text = ProductValue;
                }
            }
        }
    }

  • Dynamic Data in .NET 3.5 SP1

    I've been writing code today and trying to understand the Dynamic Data feature in .NET 3.5 SP1.  There are some cool new attributes.  I think my favorite one is [DataType()].  With the DataType attribute, a programmer is effectively providing a simple hint to the system regarding what the datataype is being used for.  I added a DataType attribute to one of my columns like [DataType(DataType.Currency)].  All of a sudden, I got Currency formatting and such.  Very cool indeed.

  • Ebook on ASP.NET 3.5 Service Pack 1

    I'm working on a new book (ebook) for Wrox.  The topic is the new features in ASP.NET 3.5 Service Pack 1.  I've just finished my two code examples for routing in Webforms, yes, I said Webforms.  Thanks to Scott Allen for some code help.

  • I'm Back

    I've been fairly heads down working on a project.  I got done with it last week and took a few days off to recover.  I'm back now.

2006 - Wallace B. McClure
Powered by Community Server (Non-Commercial Edition), by Telligent Systems