computer codeFun with ASP.NET Applications

The best way to learn something new is to try it out, and so this page shows some sample applications I’ve written while learning various .NET programming techniques.  I’ve tried to make them at least interesting and at most somewhat useful.  Each person is unique, but I’ve learned best by a combination of book learning (via Microsoft certifications), online video training (via AppDev Online, and Microsoft Channel 9) and reading lots of blogs/forums via google searches.  Once you find something which looks interesting to you, write a small sample program which you find fun, useful, or interesting and SHARE it with others- that’s how we all benefit 🙂 .

Right now I’m particularly interested in Web API’s/mashups/services which combine interesting web services in different ways.  These types of applications are nice because they show how to interact with programming interfaces across the web and can be run from any browser or even a mobile device like your phone.  To get some ideas, a great website to check out is ProgrammableWeb which has over 2000 API’s documented where you can go and get specific information about interfaces you might be interested in.


GridView .NET Ajax Modal Popup Example

I recently worked on an application which used expensive 3rd party controls to do popup gridview search results.  They were buggy and had a different programming model and so I wondered if “standard” .NET controls could achieve this result.  The result is a sample page showing how to create a modal popup window in an ASP.NET application containing a gridview.  When the user selects an item, the data is written to a textbox control.  This was done using the basic Ajax Control Toolkit and jQuery to show that fancy 3rd party controls aren’t needed to achieve this behavior.  The secret is to use the ModalPopupExtender control on a panel to display the gridview and prevent interaction with the rest of the page until an item is selected.  You can read the original blog post here.

Try the app by clicking on the title above or this link:  gridview example.  The sample code and description: Code is here.


Flickr Location Based Pictures

This program tries to detect your location settings and shows Flickr pictures which have your city’s name in the description.  It also presents a dropdown list of other interesting cities around the world you can choose from.  It uses the Flickr API of recently uploaded public photos to choose from and randomly shows 1 “page” out of 40.  Choosing another city or clicking the button randomoly selects another page to display.  You never know what you’ll get, which makes it oddly fascinating!

This program demonstrates how to integrate with an API such as Flickr and process the returned data using a free third party library to interact in a friendly .NET object oriented fashion (FlickrNet is here).

The location service demonstrates how to call a web service that returns a JSON string (very common on the web) and deserialize the string into a .NET object using the System.Web.Script.Serialization.JavaScriptSerializer class.  It sounds intimidating but is actually pretty straightforward and slick.  Once it’s in .NET you can work with the data just like any regular .NET object without having to parse the response string.

Try the utility by clicking on the title above or this link: Flickr Location Pictures.  Sample code and description: Code here


Combined Bing/Twitter instant search

This application uses ASP.NET to implement an “instant” like search using Bing and Twitter.  Search results appear somewhat quickly after each keystroke.  This was an experiment in search API’s using .NET server side processing.   Unfortunately ASP.NET isn’t nearly as fast as client side scripting, so the “instant” part isn’t nearly as fast as Google instant or this example created by Long Zheng ( but it was a good learning exercise.

Try the app by clicking on the title above or this link:  Bing/Twitter Instant Search.  The sample code and description: combined bing/twitter instant search code


BrowserSpy Utility

Most people have heard that browser “cookies” are used to store information and track web navigation across the internet.  Some browsers have a private mode which disables cookes, and possibly also turns off scripting (therefore disabling Javascript which can gather tons of client side information).  Did you know there’s a wealth of information passed around by your browser even if cookes and scripting are disabled?  This application examines your browser capabilities and displays a list of over 100 items that can be tracked…including your approximate location (via IP geolocation).  There’s nothing to worry about- this is the way the internet is designed but something to think about- because people don’t usuallly change thier browser settings much, these settings create a “profile” which could be aggregated and tracked on various sites across the web.  This program demonstrates how to examine the HttpBrowserCapabilities object and iterate through the Dictionary key/value collection it contains.

Try the utility by clicking on the title above or this link: BrowserSpy.  Sample code and description: <coming soon>