3.2.0

How to raise a siver-side event?

I have made a AW.UI.Button. How can I trigger a server side event handler? For example:

var button=AW.UI.Button;
button.onControlClicked = function(event){
ServerFunction();//this is a C# method on code-behind file.
};

How can I make it works even cause a postback?

Thanks,
mrhsh
May 15,
You should trigger postback from the script, something like form.submit()

button.onClick = function(){
        document.forms.myForm.submit();
    }
Alex (ActiveWidgets)
May 15,
Thank you for your help! I have tried this way, but it can only cause postback. How can I let the specific C# method executed? As my above example, there is a method in my code-behind C# file:

public partial class Sample
{
//......
protected void ServerFunction()
{
//some code for this method here.
}
}

How can I let the program exacute the ServerFunction() after the postback?

Thanks,
mrhsh
May 15,

This topic is archived.

See also:


Back to support forum