Formview and AJAX Update Panel Problem

Formview and AJAX Update Panel Problem

Old forum URL: forums.lhotka.net/forums/t/3132.aspx


Jordan posted on Tuesday, July 03, 2007

Hey All,

I'm having some issues with using an AJAX Update Panel in a Formview.  I'm trying to place an Update Panel for a few dropdownlists in my formview while in edit mode.  Basically I can get the update panel to work, do some postbacks and all, but it won't bind to the csladatasource to update the database.  Basically I want to use the update panel to enable and disable some controls based on what the user enters.  I'm also using some validation controls with it too.  I've got the ScriptManger in there and everything. 

I did try placeing the entire formview in the update panel, and it updates, but whenever you press save, the validation controls don't apear.

Also, I've tried using the WebAsyncRefreshPanel from Infragistics, its saves to the database, but whenever I click on a dropdownlist that I have doing a postback it does a full postback and reloads the entire page.  I'm trying to get the functionality of this as clean as possible and it show all of the validation.  I've been at this for a while, if anyone has any tips for this, it would be awesome!  Thanks in advance and have an AWESOME 4th of July!

Jordan replied on Friday, July 06, 2007

Well, we were able to figure out how to get around this.  So, when Microsoft release AJAX, all of the microsoft asp.net validator controls are not compatible at all.  To get around this, we found this resource, and it works!

http://blogs.msdn.com/mattgi/archive/2007/01/23/asp-net-ajax-validators.aspx

So, if you are working with AJAX and validation, this will help!  Microsoft will send an update eventually to fix this issue.  In the mean time, here is a temporary solution.  I hope this helps any of web programmers!  Oh yeah, and you will want to put the entire formview in the UpdatePanel, if you are using that.  Have a great Friday!  :D

Copyright (c) Marimer LLC