Seedling Up until today, CodersBarn was based on BlogEngine 1.1. using XML. I was having ongoing problems with the comments system, and honestly believe that without feedback from readers, nobody gains. So, for the past week, I have been working on porting it to the new 1.3 version using SQL Server. 

The comments system is now up and running :-) Please feel free to comment on any existing posts or to make suggestions on what content you would like to see from an ASP.NET point of view. Use the contact form to ask questions or to request code snippets. I will attempt to respond to all emails. Over time, the goal for this blog is to move closer to a real community, a community that shares the knowledge rather than guarding it like some trade secret known only to the few.

The CodersBarn blog only began last summer and is already receiving over 5,000 page views per month, roughly 2,300 unique hits. It takes a little time to find a niche that needs to be filled. In the future, I see this blog offering up more and more practical, "How To" articles and code samples. It's not a news blog and doesn't attempt to create traffic by throwing up cheap links to other people's work. The original idea was to create a place for students of software and professionals alike, to speak candidly about this great profession and where it's heading.

Hats off to Mads Kristensen and his colleagues who put BlogEngine.Net together. It's an amazing piece of blogging software and was sorely needed. Prior to the launch of this free blog engine I was already procrastinating for over a year on coding my own engine... a case of the mechanic's car? The availability of this software and the ease of installation saw this blog designed, a name chosen and registered, and the first post published, all in a single weekend. This migration to a databased version was made particularly easier by the availability of intructional installation videos from Al Nyveldt.

Mind Games Add this to your Christmas list! Neuro-engineering company Emotiv Systems have developed a headset that will allow you to control your electronic games using your thoughts alone. It's expected to market for around $299 next Christmas.

According to company president Tan Le, Emotiv's software algorithm "unfolds the cortex and takes us closer to the source of the signal." According to their website company overview: "while Emotiv Systems is currently focusing on the electronic gaming industry, the applications for the Emotiv technology and interface span an amazing variety of potential industries -- interactive television, accessibility design, market research, medicine, even security -- and plans for introducing Emotiv into these realms and more are already in the works".

All I can say is that if this communication channel is fully duplex, do not buy one for the wife!

Check the full story on Discovery.

Pondering... I recently started work on my first website to integrate with PayPal. The client needed it done relatively quickly. What started out for me as a mental picture of a products Web form with a "Buy Now" button, somehow turned into a full-blown e-commerce application complete with custom shopping cart. Talk about feature creep! And most of it was my own fault because I failed to anticipate the minimal requirements for the job. I'm still in the thick of it and have just implemented an admin back-end for the merchant to add products, complete with images, to the database. Then, I had to create an HttpHandler to stream the images...

They do say it's the simple things that get you stumped. For all of you ASP.NET developers out there who have yet to integrate a site with PayPal, just wait until you finally get to add that button to your form to pass the transaction details over to PayPal... In short, it won't work! The button HTML from the PayPal site is embedded in a form tag. You can only have one form on an ASP.NET page and ASP.NET provides its own. If you have a master page, then the form tag is in there and it is applied to every page in the site when they are merged with the master at runtime.

Thinking Irishman PayPal support does not offer a practical solution. They may try to get you to download their ASP.NET SDK which is 1.1 and uses Web Services. Most people have failed to get it to work with 2.0. Then they may tell you to put the form tag "outside" the main tag or on a separate HTML page, etc. I have seen endless hacks, most of which were too stupid to even consider; IFrames anyone?!!

I trudged through the forums and saw that ASP.NET developers have been asking how to get around this for the last three years or so. PayPal refuses to acknowledge the problem and seem more inclined to offer support for the PHP community. There is something radically wrong with this mindset from a business point of view.  Can PayPal not afford to pay some contractors to go in and develop an ASP.NET 2.0 SDK that will work with both NVP and Web Services? Nothing like speed to kill. Then PayPal had the temerity to invite me to complete a survey on how good I found their support service...

The Light Goes On So I turned to Google. I spent days concocting search strings that would bring that elusive nugget I needed to solve the problem. I thought I had found it when I came across the nested master page hack - keep the outer master page stripped of any form tag and then just use it for the page with the PayPal button. It would probably work, but if you don't get a code smell from that one, you may need to get your sinuses reamed out. The search continued. You know you're desperate when you start entering your grannie's middle name in the search query string :-O

Persistence finally paid off. I found an elegant solution on Jeremy Schneider's blog that consists of a custom HtmlForm class that can have the form tag rendering toggled on and off. The class is called GhostForm and has a property, RenderFormTag. When RenderFormTag is set to false, it doesn't render the opening or closing tags, but does render all of the contents. Reference the custom GhostForm class and in the code-behind of the form on which you are placing the button, place the following in the Page_Load to disable the master page form tag:

public partial class Products : System.Web.UI.Page
     protected void Page_Load(object sender, EventArgs e)
         GhostForm mainForm = new GhostForm();
         mainForm.RenderFormTag = false;
         // Send your data to PayPal :-)