Solved

ASP.NET AJAX - send script from server to run immediately on page after partial page postback

Posted on 2011-02-17
1
274 Views
Last Modified: 2012-06-27
I've got an update panel on a page that loads information on a button click.  During the postback to the server I would like to be able to pass a script back down to the client to run as soon as the update panel finishes it's update.

I've tried using this so far in the button click event
ClientScript.RegisterStartupScript(this.GetType(), "HideCustomLoadingIndicator", "HideCustomLoadingIndicator();", true);

But it is not calling the javascript function as I'm wanting it to.  What is the key to making this happen?
0
Comment
Question by:JosephEricDavis
1 Comment
 
LVL 16

Accepted Solution

by:
BurnieP earned 500 total points
ID: 34921698
You should be able using the ScriptManager :

ScriptManager.RegisterStartupScript(Page, this.GetType(), "script", "your script", true);

0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question