So, I decided to put my custom GridView in a AJAX UpdatePanel.  This was my first serious exposure to AJAX (  I discovered that I was having major problems.  I kept getting an "unspecified error".  Because it occurred whenever I clicked on a row, I assumed it had to do with the JavaScript I wrote for the GridView.  I did tons of web searching about how to properly use script in a controlled wrapped in an update panel.  I tried a few things, including embedding the script and registering the script with the script manager.  None of this helped.  I finally found a forum post that said something about malformed html.  So, i decided to check out what I was rendering.  Because my control added a hidden field, It ended up rendering the <input> along with the <table> inside a <div>.  I also had the whole thing (including my update panel) wrapped in a <p>.  After cleaning this up, amazingly everything was peachy.  I suppose I can thank ASP.NET AJAX for making me more honest with my HTML.

The "sorta" in the title is in reference to some work I did a few years ago (2003-04).  A colleague of mine started implementing a rough form of AJAX.  Basically he wrote his own framework and we continued to enhance it to meet our needs.  He was certainly ahead of the curve.  The applications we were able to develop were quite nice.  We had our own tree view that could get additional branch data without refreshing the screen.  The only caveat was that we really couldn't mix server-side controls with our brand of AJAX.  In fact, we had a lot of JavaScript and a handful of aspx pages that simply returned XML responses.  It was quite elegant.  Well done Andres.

posted on Sunday, March 9, 2008 10:13 PM
Filed Under [ .Net ASP.Net AJAX ]


No comments posted yet.

Post A Comment