Two very good talks this evening 9 Sep 2008 at AZGroups. Thanks to Rob Bagby for staying behind and keeping the conference room open for us.
Scott Cate talked about a new control in SP1 of ASP.NET 3.5, the server side of an Ajax Forward/Back Button history. Scott's code for this demo and many of his other demos can be downloaded from http://www.codeplex.com/ScottCateAjax/
The main snippets of wisdom that I took away from this talk were:
- 2 new (I think that they're new) attributes to the <asp:ScriptManager> tag which EnableHistory (which you need to set to true to enable the history of the back and forward buttons) and EnableSecureHistoryState whch defaults to true and does not need to be set unless you want human readable text to be on the URL and hackable which may be the case for an intranet or other URL's that you would like to enable human hackability.
- In your page's OnInit() event you need to wire up the ScriptManager's Navigate event handler where the correct page is set on a paged control when you revisit the page using the navigation buttons.
- The grid's pageindexchanging and sorting events also need to be added as handlers which is where the history points are set.
So to summarize: Set history points while navigating the grid using the sorting or paging controls on the grid. Restore the grid to those history points in the ScriptManager1_Navigate event when using the back and forward buttons.
The link that's produced is a perma-link whether it's the encrypted one or the plain text link and will return you to the correct page and sort setting that the grid had.
Snippets of wisdom:
- The official jQuery website where you can download jQuery is at jquery.com
- jQuery allows you to select something and then do something with that selection. You can chain selections together with the fluent interface.
- Lightbox example.
- Corners example.
- Visual jQuery is a great reference site/page for jQuery.
- 15 Days of jQuery Tutorials
- Google Tech Talk Dmitri Gaskin jQuery video
- jQuery intellisense in Visual Studio 2008 and blog post.
- Scott Hanselman interviews jQuery creator John Resig on Hansel Minutes.