-1

Possible Duplicate:
How to intercept any postback in a page? - ASP.NET

I need to achieve the following target: I have an Asp.Net web form and I have a javascript function function myfunc(). I know that everytime that a control causes the page to post back, it automatically makes a call to the generated doPostBack() javascript function.

What I need to do is finding a way to tell the page to make a call to myfunc() right before EVERY call to doPostBack is performed.

In few words: before the doPostBack script activates, the page must run another javascript function!

Thankyou

Community
  • 1
  • 1
Andry
  • 16,172
  • 27
  • 138
  • 246

2 Answers2

1

Take a look at this post on how to intercept a postback:

How to intercept any postback in a page? - ASP.NET

Community
  • 1
  • 1
0

I assume you tried using the ScriptManager Class?

http://msdn.microsoft.com/en-us/library/system.web.ui.scriptmanager.aspx

RegisterScript would be a good start...

http://msdn.microsoft.com/en-us/library/bb310408.aspx

Andrew
  • 3,650
  • 9
  • 31
  • 32
  • No, didn0t use it... how should I do this?? There are several methods but I see no attachScript or similar, I need a bit more time to look better... – Andry Jun 29 '11 at 21:54