Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2011-02-17
1
Medium Priority
?
280 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 2000 total points
ID: 34921698
You should be able using the ScriptManager :

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

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

886 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