﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Ayende Rahien commented on Why isn't there a simple way to trigger an UpdatePanel from client script?</title><description>@Scott,
  
  
Yes, I know that, but in this case, I have several panels that contains information, the user is updating a record, which should cause all the other updates to be refreshed. I can't register a control as a post back trigger, because the refresh is depending on the input from the user.
  
The use case for an update panel in this case is: "I want to update this particular section of the page with information."
  
In this case, there isn't any way to do this short of faking a postback that the update panel will catch. This seems unnatural to me, because there isn't anything there that should be clicked.
</description><link>http://ayende.com/2128/why-isnt-there-a-simple-way-to-trigger-an-updatepanel-from-client-script#comment6</link><guid>http://ayende.com/2128/why-isnt-there-a-simple-way-to-trigger-an-updatepanel-from-client-script#comment6</guid><pubDate>Fri, 23 Feb 2007 07:08:47 GMT</pubDate></item><item><title>Ayende Rahien commented on Why isn't there a simple way to trigger an UpdatePanel from client script?</title><description>@Justin,
  
I need to make a decision on the client side if I would update the panel or not, it is not just clicking on a control and being done with it.
  
  
I would hope to avoid using the private methods.
  
I am already forced to do this for updating cascading drop down from code.
</description><link>http://ayende.com/2128/why-isnt-there-a-simple-way-to-trigger-an-updatepanel-from-client-script#comment5</link><guid>http://ayende.com/2128/why-isnt-there-a-simple-way-to-trigger-an-updatepanel-from-client-script#comment5</guid><pubDate>Fri, 23 Feb 2007 07:08:04 GMT</pubDate></item><item><title>Justin-Josef Angel [MVP] commented on Why isn't there a simple way to trigger an UpdatePanel from client script?</title><description>You can use the server-side ScriptManager.RegisterAsyncPostBackControl so any control event will make the updatepanel refresh. 
  
http://ajax.asp.net/docs/mref/M_System_Web_UI_ScriptManager_RegisterAsyncPostBackControl_1_62fe17e7.aspx
  
  
or (and you didn't here this from me) look at the Javascript code RegisterAsyncPostBackControl produces and use the Sys.WebForms.PageRequestManager.getInstance()._updateControls client-side method.
  
Naturelly, you should never use javascript private methods. But you can :-)
</description><link>http://ayende.com/2128/why-isnt-there-a-simple-way-to-trigger-an-updatepanel-from-client-script#comment4</link><guid>http://ayende.com/2128/why-isnt-there-a-simple-way-to-trigger-an-updatepanel-from-client-script#comment4</guid><pubDate>Fri, 23 Feb 2007 05:31:03 GMT</pubDate></item><item><title>scottgu commented on Why isn't there a simple way to trigger an UpdatePanel from client script?</title><description>UpdatePanels update when a control inside them does a post-back, or when a control that is associated with the updatepanel via a trigger does a postback.
  
h
  
So for example, if your button was inside the updatepanel, and you wanted to cause it to postback, you'd just write this JavaScript:
  
  
$get('&lt;%=MyButton.ClickId %&gt;').click();
  
  
This will cause the button to fire, and the updatepanel it was in (or associated with via a trigger) would update.
  
  
Thanks,
  
  
Scott
</description><link>http://ayende.com/2128/why-isnt-there-a-simple-way-to-trigger-an-updatepanel-from-client-script#comment3</link><guid>http://ayende.com/2128/why-isnt-there-a-simple-way-to-trigger-an-updatepanel-from-client-script#comment3</guid><pubDate>Thu, 22 Feb 2007 23:08:51 GMT</pubDate></item><item><title>Ayende Rahien commented on Why isn't there a simple way to trigger an UpdatePanel from client script?</title><description>@Justin,
  
You pointed me at the SERVER reference, I need it from CLIENT.
  
What I am looking for is something like this:
  
  
&lt;body&gt;
  
    &lt;form id="form1" runat="server"&gt;
  
        &lt;asp:ScriptManager ID="ScriptManager1" runat="server" /&gt;
  
    &lt;div&gt;
  
   Last Postback: &lt;%=System.DateTime.Now %&gt;
  
    &lt;asp:UpdatePanel ID="UP1" runat="server"&gt;
  
        &lt;ContentTemplate&gt;
  
            Last Update: &lt;%=System.DateTime.Now %&gt;
  
        &lt;/ContentTemplate&gt;
  
    &lt;/asp:UpdatePanel&gt;
  
    &lt;input type="button" onclick="$get('UP1').Update(); return false;" /&gt;
  
    &lt;/div&gt;
  
    &lt;/form&gt;
  
&lt;/body&gt;
  
</description><link>http://ayende.com/2128/why-isnt-there-a-simple-way-to-trigger-an-updatepanel-from-client-script#comment2</link><guid>http://ayende.com/2128/why-isnt-there-a-simple-way-to-trigger-an-updatepanel-from-client-script#comment2</guid><pubDate>Thu, 22 Feb 2007 21:43:03 GMT</pubDate></item><item><title>Justin-Josef Angel [MVP] commented on Why isn't there a simple way to trigger an UpdatePanel from client script?</title><description>Then you should probably use the UpdatePanel.Update client-side Method :)
  
  
http://ajax.asp.net/docs/mref/M_System_Web_UI_UpdatePanel_Update.aspx
</description><link>http://ayende.com/2128/why-isnt-there-a-simple-way-to-trigger-an-updatepanel-from-client-script#comment1</link><guid>http://ayende.com/2128/why-isnt-there-a-simple-way-to-trigger-an-updatepanel-from-client-script#comment1</guid><pubDate>Thu, 22 Feb 2007 19:44:11 GMT</pubDate></item></channel></rss>