views:

27

answers:

2

Hi I'm trying to refresh update panel via Javascript:

  __doPostBack("<%=upMyPanel.ClientID %>", "");

But somehow its controls are all empty. On other hand they are all filled when I click any trigger control. How can I fix this? thanx.

+1  A: 

AFAIK the UpdatePanel doesn't really postback, so your postback should be using a control that is registered for postbacks (i.e. the trigger control you speak of).

__doPostBack("<%=btnMyTrigger.ClientID %>", "");
Mantorok
Well i tried __doPostBack("<%=ddlScenario.ClientID%>", ""); where ddlScenario is an external trigger for this panel but still it does not work. IsPostback property is false. So it seems that this is GET request.
Voice
I think we may need to see a bit more of your HTML, without knowing exactly what you are trying to do it's a bit tricky :-)
Mantorok
A: 

The UpdatePanel has no client-side API; third party update panels typically do but not the MS one... You could try __doPostBack() as mentioned and target a control that posts to the server (like a button).

Try making the update panel mode to always to see if that works properly with __doPostBack. Also, try the UniqueID instead of the ClientID.

Brian