AJAX UpdatePanel help needed

I have the following ASPX code: <!– THIS WOULD BE A LOOP FROM HERE –> <!– OPENS RESULT ITEM DIV CONTAINER –> a href=”%# Eval(“>” target=”_blank”> <%# Eval(“urlPageTitle”)%> I have a NextImg_Click() event which works fine.I use this code for DataBind… what is the Update method?urlsUpdateRepeater.DataSource = resultsCollection;urlsUpdateRepeater.DataBind();Everything would appear …

via C Programming Language Tutorial » Search Results » ajax:

AJAX UpdatePanel help needed

I have the following ASPX code:







” target=”_blank”>
<%# Eval("urlPageTitle")%>




I have a NextImg_Click() event which works fine.
I use this code for DataBind… what is the Update method?
urlsUpdateRepeater.DataSource = resultsCollection;
urlsUpdateRepeater.DataBind();Everything would appear to be in order. But every time the Update button is clicked it re-renders the whole page instead of the partial-postback UpdatePanel only.
It is driving me completely mad as I can’t see anything wrong with the code. Is there some simple thing I’m missing?! Please help!
The search and data is displayed correctly (inside the panel) it just will not do a partial postback.
Appreciate your help with my noob problems!
…………………………………..

Because the button is inside your UpdatePanel’s ContentTemplate, it is unnecessary to take any extra action to get a partial page postback.
Try removing the line from your Page_Load() method.
…………………………………..

Taken from MSDN:
Use the RegisterAsyncPostBackControl method to register controls outside an UpdatePanel control as triggers for asynchronous postbacks, and to potentially update the content of an update panel. To update an UpdatePanel control programmatically, call the Update method.
So, you’re control (UpdateButton1) is inside the UpdatePanel, no need for the ScriptManager1.RegisterAsyncPostBackControl call – ditch it and your problem is solved.
…………………………………..

The problem was that my

tag was nested further into the document than it’s corresponding end tag (with Warning!)…
Upon moving my form tag – it worked!
Entirely my fault, thanks guys.

For more info: AJAX UpdatePanel help needed

C Programming Language Tutorial » Search Results » ajax

AJAX UpdatePanel help needed

Share this post:

Related Posts

Leave a Comment