Last post Oct 05, 2011 10:42 AM by mmazeemahmad
Feb 09, 2007 12:51 PM|mcgurk|LINK
<atlas:UpdatePanel ID="UpdatePanel1" runat="server" Mode="Conditional" >
Hello from inside the update panel!!!!
<asp:Button ID="foo" runat="server" OnClick="foo_Click" Text="Click me to postback!" />
would cause the function alert() to run every time the UpdatePanel returns from the button click. This is not the case, however.
How do I do this? My update panel contains a scrolling Div and I want to scroll to a particular node after the UpdatePanel updates, and this is the only way I can think of to do it...
Feb 09, 2007 08:01 PM|Garbin|LINK
you could use the RegisterStartupScript method of the ScriptManager to programmatically inject the script to load after a partial postback.
Feb 12, 2007 01:20 PM|mcgurk|LINK
Feb 12, 2007 06:33 PM|Steve Marx|LINK
Really, any particular reason you're still on a prerelease build? I don't remember when those methods got introduced on the ScriptManager, but they might be in your build too.
Feb 13, 2007 09:13 AM|mcgurk|LINK
Feb 13, 2007 06:21 PM|rajbk|LINK
Mar 26, 2007 04:52 PM|eluelendil|LINK
here's my scenario:
A button inside an UpdatePanel is clicked, some server side code runs, and I want to run a JS function after the server side processing ends. The JS function to run is dependent on the server side processing and its result.
In the OnClick event handler of the button, as last line, I have:
However, no alert is displayed at client side. What am I missing?
PS: all this happens in an ascx control
Mar 27, 2007 02:39 AM|ciprian_kis|LINK
You should call the method in this way:
The problem could be the fact that you are using this instead of this.Page. Also instead
Hope it helps...
Jun 12, 2007 07:55 PM|bhannemann|LINK
Did this fix your problem? I'm having a similar issue where my script runs on page load, but subsequent partial renders do not fire the script. Please let us know if this solution worked for you or if you had to tweak it more.
Jun 12, 2007 11:26 PM|chetan.sarode|LINK
See for more details...
Jun 13, 2007 10:49 AM|bhannemann|LINK
Thanks, got it to work by moving my js into a true function (instead of just inline) and calling it all via:
Jun 13, 2007 11:29 PM|chetan.sarode|LINK
If your issue is resolved, Please mark the answer
It will help for others..
Oct 04, 2007 09:34 PM|AnandSD|LINK
If we want to execute JS function during ajax call
write your script in page load
ScriptManager.RegisterStartupScript(this.updatePaneLid, this.GetType(), "Show_Font", "showFont();", true);
Hope this helps
Feb 26, 2008 05:28 PM|acidcool524|LINK
Thanks for this code, it works for me, except that the progress bar ("Updating...") is still showing while the alert box already says "Transactio Completed". How to make the progress bar go away?
Also, what does addScriptTags parameter indicates on ScriptManager.RegisterStartupScript(this.updatePaneLid,
Feb 26, 2008 08:07 PM|kirchi|LINK
// runs each time postback is initiated by any update panel on the page
this will work, in case you need to run code when ONLY a particular UpdatePanel is refreshed - let me know - You can differentiate this in handler - I will give that code as well .
Jan 20, 2009 05:22 AM|hannibal82_|LINK
i have another idea ..
u can use the UpdatePanelAnimationExtender control like this:
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<!-- ... code -->
<AjaxToolkit:UpdatePanelAnimationExtender ID="UpdatePanelAnimationExtender1" runat="server"
Apr 01, 2009 08:04 PM|orlink|LINK
Aug 25, 2010 03:01 PM|green626|LINK
thanks kirchi, this works for me, that is the right answer!
Sep 13, 2010 01:48 PM|raechelann|LINK
Excellent post. Thanks
Oct 05, 2011 10:42 AM|mmazeemahmad|LINK
COULD YOU TELL ME THAT WHAT IS typeof(Sections)
IN YOUR SYNTAX, I GOT AN ERROR ON IT THAT "The type or namespace name 'Sections' COULD NOT BE FOUND"