How To Scrape Email in Microsoft Outlook - C#

26. March 2008
Make the body of any email (ie. newsletters, press release's, etc) in your Outlook 2003 client putty in your hands with this C# code (sorry had to do a screenshot):

Don't forget to add a reference to Micorsoft.Office.Interop.Outlook. "Done" is a subfolder i created under the default inbox in my Outlook to hold emails that have been processed by my scraper. When you run this app you will get a security MessageBox in Outlook asking you to grant permission:

The box can be avoided using Outlook Redemption (which does work, I have used it) or you can do what I do, and just manually run the app and allow access for 10 minutes. Happy mail scraping! Money mouth

web development

 Guy Kawasaki asks Steve Ballmer: Why do you want to buy Yahoo?

25. March 2008

Guy Kawasaki interviewed Steve Ballmer at MIX '08 at the Venetican in Vegas earlier this month. It's very very interesing! Smile Here are a couple quotes from the first 4 mintues of it:

  • Guy Kawasaki : "Why do you want to buy Yahoo?"
  • Steve Ballmer: "We made an offer. It's out there baby!"
  • Guy Kawasaki : "Why didn't you hire me back in '87?" ... "I think it's racist"
  • Guy Kawasaki : "Steve Jobs never invites me to do this"
  • Guy Kawasaki : "Don't pick up any chairs and throw it at me. Don't go monkey on me either!"
  • Guy Kawasaki : "The Y word is all about the G word"
  • Guy Kawasaki : "Do you think you have to do Google in?"
  • Guy Kawasaki : "you can't even bring yourself to say the Google word can you?"
  • Steve Ballmer : "Google, Google,Google,Google"
  • Guy Kawasaki : "Do you have little pictures of Larry and Sergey that you throw darts at?"
  • Steve Ballmer : "We're just the little engine that could."
  • Guy Kawasaki : "What do you think about Apple? Is it a little chiwawa that you kick away?"

LOL, good stuff. Awesome interview! The whole time Kawasaki is sitting there with a MacBook Air on his lap! I highly recommend everyone check it out. 

Clickety: http://www.microsoft.com/presspass/events/mix/default.mspx

web development

 5 Things To Watch For When Selling A Website Online

8. March 2008

I have a little bit of experience selling websites online now and there are a fews things that happen every time. I'm not talking about large websites here, just smaller one-man-show sort of sites - the kind you find for sale on eBay or SitePoint. Here they are:

1. By putting your site up for sale, you are basically exposing your sites entire business model for the world to see (and to copy).  So don't put your site up for sale unless you truly plan on selling it. Keep in mind it may not sell so be careful what you tell the world about it.

2. Everyone and their dog will hammer you with questions about your site. Not because they want to buy it, but because they are trying to extract information from you that they can use to monetize their websites. They will say they are interested, pepper you with questions, then disappear forever. This happns A LOT on SitePoint.

3. People will bid on your auction, when they have no intention whatsoever of buying it. Strange/weird but true.

4. A LOT of people that have no clue how to run a website will want to buy it. Be careful here because you could wind up selling your site to someone, only to get emailed hourly/daily with questions on how to do this, and how to do that. If you are selling smaller sites like I do, you can kiss your profit goodbye given the amount of your time they will take up with questions.

5. Selling a site is like selling a used car.  You will spend your time talking about the great things about your site, and buyers that contact you will spend their time talking about how your traffic is declining, profit is declining, etc, etc, even though it isn't true at all. Btw, I find this is the mark of a true buyer as well. People that really want to buy your site, will be the ones that are most critical of it. If they aren't being critical, chances are they are just trying to extract information for use elsewhere.

 There you have it, some things to watch for that will happen if you decide to sell your website, so prepare for it!

web development

 AJAX Control Toolkit - RequiredFieldValidator Extender

7. March 2008

I just released the first version of the ASP.NET RequiredFieldValidator Extender control. The control is built on top of Microsoft's AJAX Control Toolkit. What is does is extend the behavior of an ASP.NET RequiredFieldValidator control to apply a CSS class to the control being validated if it is invalid (client side). It also will apply a CSS class to an ASP.NET Label control as well. For example, say you have a textbox on your ASP.NET page that is required such a name textbox:

If the user submits the form with an empty textbox, the result will be that the textbox and label will have the CSS class you specify applied to them. In my case, I wanted them to show in red:

And here is a screenshot of the ASP.NET Markup used to create the sample above:

With this control, all you need to do to add your custom CSS to a required field is to reference the assembly in your ASP.NET project, register the control in your web.config file,  and then add the RequiredFieldExtender as shown above to your ASP.NET Markup.  The control can be used against any control being validated with a RequiredFieldValidator control such as TextBox, RadioButtonList, DropDownList, etc.  I think this control will be huge time saver for ASP.NET developers who need to do client-side control validation with CSS classes.

Complete source code, assembly, and sample ASP.NET web app are available here  (Releases tab) at the control's project on CodePlex.com. I should note the Solution was built in Visual Studio 2008 against the .NET Framework 3.5.

Questions? Drop me a comment and I will try to answer. Laughing 

web development

 Super Easy .NET Scraping

23. February 2008

Automated screen scraping is great way to get fresh data into your network of money making sites (duh) and into your PPC campaigns without spending all your time updating sites.  The HttpWebRequest and HttpWebResponse objects fit the bill well for just such scraping (thank you Microsoft).  ASP.NET Library has a handy little article that sums it up well. They've also got another little sweet nugget of code that'll pull an HTML table of any page and dump it in a .NET dataset. Once you get the data in a DataSet it's putty in your hands (aka money in your wallet). Use that code against any page that displays data in a table and you own it. You don't have to look far to find money making data in an html table. Money mouth Cha-ching.

 Also,  want to scrape email dropped in your Outlook mail client? Take a peek at Microsoft.Office.Interop.Outlook.MailItem in the Outlook Object Model. Sweetness.

web development, Affiliate Marketing

 HTML 5 is here

24. January 2008

On January 22nd 2008 the W3C published the First Public Working Draft of HTML 5 - this is a big step forward since this draft has been in the works for several years. It was initially just being developed by the WHATWG, with the W3C HTML Working Group coming on board to help out with it in March 2007. Alongside the HTML 5 draft a HTML 5 differences from HTML 4 document has been published, which gives a high-level overview of what new functionality HTML 5 brings.

HTML 5 will have new elements for defining more logical and semantically superior structure, such as section, header, and footer. It will also have new native controls, such as progress, datagrid and various new values for the type attribute of the input element. And it features a canvas element that can be used to dynamically create bitmap graphics using a sweet JavaScript API for 2D graphics.

web development

 70,000 Web Pages Hacked

9. January 2008

Information Week has an article this morning about a group of web pages in a server farm getting hacked via SQL Injection. I belive they were all Microsoft SQL Server boxes that got hacked. WTF Chuck? Protecting your site against SQL Injections is web site security 101. Now 70,000 pages is virtually zero when it comes to how many pages are on the web so the attack was relatively nothing (except to the people who own them I guess) but damn. Someone fell asleep at the wheel. If you aren't doing input validation - you're wrong. I would do a little run down of how to do input validation but the 41%43%45%20%54%65%61%6d from http://blogs.msdn.com/hackers/ have just finished a great series doing just that with .NET sites:

If you are doing ASP.NET development - check 'em out or you might find yourself in an obscure article linked to from a newsletter I subscribe to. Undecided

web development

 Blog May Go Down

4. December 2007
This blog is hosted on one of my VPS servers at GoDaddy along with a few of my other sites. Lately they've all been getting more traffic and so the memory on the VPS is maxing out every once in a while causing the sites to go down. I'm gonna play with my setup as well as some caching code I am running and see if I can configure things to work with the VPS. Otherwise I might have to move all the stuff on this box to a dedicated server. So, if this blog is down, check back shortly!

web development