
Best XKCD of the week.



Best XKCD of the week.
Mystery Mortal Kombat short. Watch it in HD!
There were a few cool references in a recent talk by Scott Hanselman, and I wanted to capture them:
Good news: awesome dance routine. Bad news: They’re too sexy for 6 years old. Worse news: CNN is stupid.
Explain how PostBacks work, on both the client-side and server-side. How do I chain my own JavaScript into the client side without losing PostBack functionality?
From StackOverflow: Postbacks are an abstraction on top of web protocols which emulate stateful behavior over a stateless protocol. On the client side, postbacks are achieved by javascript calls and hidden fields which store the state of all controls on the page. The server side goes through a life cycle of events, port of that life cycle is the hydration of the viewstate to maintain the state of all controls on the page, and the raising of events based on the parameters that were passed into the __doPostBack call on the client side.
Depending on your requirements, you can use control events like OnClientClick to chain in your client side JavaScript, or you can use the GetPostBackEventReference method to give your scripts access to the postback method on the client side.
What events fire when binding data to a data grid? What are they good for?
The unique events that fire during data binding on a datagrid are itemcreated and itemdatabound. They can be used to modify the components of a grid row programmatically. Use itemcreated unless you need access to the bound data, in which case you’d use itemdatabound.
What is needed to configure a new extension for use in ASP.NET? For example, what if I wanted my system to serve ASPX files with a *.jsp extension?
The full answer is here, but the short version is that you need to configure IIS to use aspnet_isapi.dll for the file extension you want, then configure web.config to present and compile pages with that extension.