Update Panel and Event

S

shapper

Hello,

I have a GridView inside an Update Panel.

When a GridView row is updated I want to refresh the GridView and
after it has been refreshed I want to run a JavaScript Function like:

Smoke({title: 'Hello', text: 'How are you?'});

How can I do this?

Thanks,

Miguel
 
N

Nick Chan

ScriptManager.RegisterStartupScript(MyUpdatePanel, Me.GetType,
"ScriptNameFreeText", "Smoke({title: 'Hello', text: 'How are
you?'});", True)
 
G

Guest

You can do a lot of cool things detecting when an UpdatePanel has been
updating. Script Mananager exposes a Javascript event called "EndRequest",
from there you have in the params info like: which control fired the
postback, or additional paramerets.

From there you can apply your logic and make things like: depending on which
updatepanel / parameters has been updated show a message or even make the
updated panel blink.

Some extra info:

http://msdn.microsoft.com/msdnmag/issues/07/11/CuttingEdge/default.aspx?loc=en

http://msdn.microsoft.com/msdnmag/issues/07/09/CuttingEdge/default.aspx?loc=en

http://www.asp.net/ajax/documentati...rClass/PageRequestManagerEndRequestEvent.aspx

http://www.tipsdotnet.com/ArticleBlog.aspx?KWID=2&Area=AJAX&PageIndex=0

Good luck
Braulio

/// ------------------------------
/// Braulio Diez
///
/// http://www.tipsdotnet.com
/// ------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top