I have never used handlers (.ashx) files in any of my .NET web development projects, but this all changed in the last two days. The way I understand a handler is that it acts as a ‘process’ handler and does not write any output to the browser. Where would you use this? Well I used it for a shopping cart (but in hindsight I will change this) by using a handler to process the items added to the cart. The handler took a querystring and created a datatable of none existed or added the data to a datatable if that datatable already existed and stored the datatable in a session variable, which could then be accessed throughout the application. Accessing querystring variables in a handler file requires that you implement the IHTTPHandler interface, i.e. you cannot simply type Request.Querystring in the handler.
Archive for the 'ASP.NET' Category
Panel and its DefaultButton property
ASP.NET has a server control called a panel, which allows you to display other server controls or HTML elements inside it, and one of its properties is DefaultButton. By setting the DefaultButton to the ID of a button within the panel you basically set its default keyboard event that will fire the click event associated with that button. The other alternative to this would be to add the property to the TextBox in your CodeBehind.
Silverlight Content Test in WordPress and on Apache
What does it take to host Silverlight content on a site? Why would I want to publish Silverlight content on my website?
Well, to host Silverlight content on a website that runs Apache is not the same as running .NET content on IIS. Its kinda obvious that .NET content cannot and will not run under Apache. Remember though that Silverlight is a plugin, the same as Flash, and you are simply pointing to a file (XAP) that executes on the client side. Silverlight is a client side technology if you really think about it. I have in the week for instance, experienced that content will not immediately update on the client side even if you updated it on the server side.
It is thus possible to run Silverlight content on Apache, as this simple HTML document shows. It however seems that running Silverlight in WordPress requires an iframe:
Why would I want to run Silverlight on Apache? There are many reasons I can think of and the list may grow or shrink depending on what I think is relevant for me, but here are some reasons:
- I can keep my C# skills and keep using Visual Studio. Why would I want to give up using one of the best and most powerful IDE’s in the world.
- Silverlight is a genuine Flash alternative and because it integrates so beautifully with Visual Studio and C# I can truly start developing great rich internet applications
Waiting…to build some Silverlight applications
As I sit waiting for the Visual Studio Service Pack 1 ISO to finish downloading, I spent some time looking and reading about Silverlight and about C#. I have found one or two good websites, ones that I go to regularly to check for updated articles and source code. So three of my favourite Silverlight websites at the moment:
- Martin Grayson’s Adventures of a ‘Devigner’: The title, ‘devigner’, of the blog suggests that Martin Grayson sees himself as a real designer/developer. Maybe he has that one thing that all developers sometimes miss, the knack to design and develop in one breath. I guess neat and tidy and functional is not always good enough. Then again creativity, in my opinion, can be subjective.
- Smart Draw:I have linked to them before or written about them before and they keep the website updated with new source code all the time. I like the fact that they actually illustrate that it is possible to do something both in Flash and Silverlight.
- Silverlight Made Simple by – Corey Schuman:
Is another favourite website of mine because I got source code for a simple media player from it.
Silverlight 2 was officially released recently, which meant an entire update of tools and plugins, hence the reason for downloading the Visual Studio Service Pack 1. With the new release of Silverlight you need to download a few things:
- Silverlight Developer Tools
- The updated Silverlight Plugin
- Visual Studio Service Pack 1
I downloaded the ISO for the service pack because I wanted to distribute it on more than one user machine.
So, is everything event driven?
I am busy with a Silverlight video player at the moment, and what is interesting to note and understand is that Silverlight is heavily event-driven, as is ASP.NET and a lot of the .NET framework. You can attach event handlers to almost any object, from mouse event handlers to click event handlers.
Having asked that question I took a look at the ASP.NET page life cycle and just realised how intrinsic events are in the .NET framework. There are eight basic stages in the ASP.NET page lifecycle:
- Page Request
- Start
- Page Initialization
- Load
- Validation
- Postback Event Handling
- Rendering
- Unload
Within the page lifecycle there are events raised, which allows you to write code that initialises controls that are dynamically created.
Nobody seems to know about Silverlight, for now
I would be the first to admit that not a lot of people have heard or know about Silverlight, which is Microsoft’s rich internet plugin, which is an alternative to Adobe’s Flash. It is true that Flash has been around for a long time and that Silverlight will not dislodge Flash’s entrenched following and use. But maybe, just maybe Silverlight was not designed for that purpose and that if people respond to Silverlight in certain ways it means they are taking some notice at least. The response clearly does not take into account the opportunities Silverlight offers a .NET developer. As a .NET developer I can use my C# skills to develop rich internet applications. I do not have to learn Action Script. Those same skills that I use to develop Silverlight applications can be used to develop WPF applications, ASP.NET applications and Windows applications.
Demystifying some .NET Issues
What seemed a little odd to me today was that SQL Server Express 2005 is download-able from two places. Both shows different file sizes.
Another issues that needs clarity is ASP.NET and .NET framework versions. .NET 3.5 is an ‘extension’ of .NET 2.0 and replaces .NET 3.0. .NET 3.5 covers AJAX (Asynchronous JavaScript and XML) and LINQ (Language Integrated Query)
jQuery and Microsoft
I susbscribe to The Code Project’s newsletter and today I got some great news, jQuery will be supported in Visual Studio 2008. Now this is some awesome news. Makes one wonder if the Microsoft AJAX library will become redundant.
You can read the full article on Scott Gu’s website.
Silverlight 2 Release Candidate Now Available
So Silverlight has gone from Beta 2 to Release Candidate and this means that developer tools have to be updated again. This is a pain sometimes, but I guess it goes with liking to develop on a particular platform (.NET). You can read Scott Gu’s article here.
Windows I’m a PC Campaign
Have you ever seen any of the Steve Ballmer videos on Youtube where he sells Windows? Well here is another one, but interestingly enough if you click through to the Windows I’m a PC Website you browse through a myriad of short video clips of people that say “I’m a PC”. This is Microsoft’s attempt to create a better image for Windows Vista, and I don’t know if it works and if it will work later on. Another interesting thing to note is that even Microsoft use Mac and Adobe products to develop the graphics for this campaign, as can be seen in this post. I admit that I love some of the Microsoft technologies that I work with, especially Silverlight, simply because it opens up opportunties for me as a C# developer.
Pages
Archives
- November 2011 (5)
- August 2011 (1)
- July 2011 (1)
- June 2011 (3)
- May 2011 (1)
- April 2011 (11)
- March 2011 (3)
- February 2011 (5)
- January 2011 (6)
- December 2010 (2)
- November 2010 (3)
- October 2010 (2)
- September 2010 (5)
- August 2010 (4)
- July 2010 (3)
- June 2010 (7)
- May 2010 (1)
- April 2010 (6)
- March 2010 (2)
- February 2010 (1)
- January 2010 (1)
- December 2009 (2)
- November 2009 (5)
- October 2009 (26)
- September 2009 (15)
- August 2009 (2)
- July 2009 (3)
- June 2009 (1)
- May 2009 (1)
- April 2009 (3)
- March 2009 (2)
- February 2009 (3)
- January 2009 (11)
- December 2008 (13)
- November 2008 (8)
- October 2008 (10)
- September 2008 (9)
- August 2008 (13)
- July 2008 (12)
- June 2008 (9)
- May 2008 (8)
- April 2008 (6)
Categories
- 2011 (1)
- AJAX (14)
- Application Development (23)
- ASP.NET (28)
- ASP.NET MVC (8)
- Bing (1)
- Blog Action Day (1)
- Browsers (5)
- C# (62)
- Chrome (1)
- Content Management Systems (1)
- Design Patterns (1)
- DevDays (1)
- eMarketing (6)
- Facebook (4)
- Firefox (3)
- Fremus.co.za (8)
- General (48)
- Google Chrome (1)
- Information Technology (1)
- Internet Explorer (2)
- jQuery (4)
- Leadership (2)
- LINQ to XML (4)
- Microsoft (1)
- Microsoft Events (1)
- Music (1)
- News (2)
- PC Hardware (1)
- Personal (16)
- Photography (1)
- SEO (3)
- Silverlight (11)
- Software (1)
- Springboks (1)
- SQL Server 2005 (7)
- SQL Server 2008 (3)
- tech (2)
- TranceFamily (1)
- TV Series (1)
- Twitter (1)
- WCF (1)
- Web 2.0 (13)
- Web Design (9)
- Web Development (36)
- Web Search (1)
- Web Technologies (39)
- Windows Phone 7 (2)
- Windows Powershell 2.0 (1)
- Wordpress (6)
- WPF (2)
Tags
.NET Adobe Flash AJAX Armin van Buuren ASP.NET ASP.NET MVC C# concept context CSS e-Marketing Facebook Firefox 3 Fremus General Thoughts GMail Google Google Analytics Javascript jquery LINQ to XML LiveValidation Microsoft Microsoft Access Microsoft Powerpoint object-oriented Personal PHP Programming ScrewTurn wiki Silverlight Social Media Social Networking South African E-Marketing SQL Server 2005 Twitter Visual Studio 2008 WCF web-based solutions Web 2.0 Web Design web development wiki's Wordpress WPF