To call the client side method, you need to do the following:
1- Create a server side method:
void DoSomething(...) { ... }
2- Embed System.Web.UI.IPostBackEventHandler.RaisePostBackEventthat takes one string argument (you can name the value of this argument) .:
public void RaisePostBackEvent(string eventArgument)
{
DoSomething(...);
}
3- Write a script to invoke the response entry:
function TriggerPostBack(control, arg){
__doPostBack(control, arg);
}
4 If necessary, call the PostBack launch function:
<a .... onclick="TriggerPostBack('control', 'arg')" .. />
source
share