First time working with UpdatePanels in .NET.
I have an updatepanel with a trigger pointed to an event on a FormView control. The UpdatePanel holds a ListView with related data from a separate database.
When the UpdatePanel refreshes, it needs values from the FormView control so that on the server it can use them to query the database.
For the life if me, I can't figure out how to get those values. The event I'm triggering from has them, but I want the updatepanel to refresh asynchronously. How do I pass values to the load event on the panel?
Googled this ad nauseum and can't seem to get to an answer here. A link or an explanation would be immensely helpful..
Jeff
If you are working with an UpdatePanel just make sure that both controls are inside the panel and it will work as desired.
make a javascript function that will collect the pieces of form data, and then sends that data to an ASHX handler. the ASHX handler will do some work, and can reply with a response.
This is an example I made that calls a database to populate a grid using AJAX calls. There are better libraries for doing AJAX (prototype, ExtJS, etc), but this is the raw deal. (I know this can be refactored to be even cleaner, but you can get the idea well enough)
Works like this...
The html will look like this...
The script that fires on click will look like this...
And the ashx handler looks like this....
Try
Try NOT using Update panels.... They can often cause more trouble than they are worth. It may be faster and less headache to use regular AJAX to get it done.