Dec 29, 2014, 7:19 AM
[CLOSED] DirectEvent: Call from clientside and getData()
Hi,I am little curious to know how can I call a direct method from client side and get returned data from the event and store in variable with getData( ) .
May be I am wrong ,please correct me.
May be I am wrong ,please correct me.
<script>
var callDirectMethod=function()
{
//How I call a directmethod and consume return data from method
}
</script>
@(X.Button()
.Listeners(l =>
{
l.Click.Handler = "callDirectMethod";//This method I declare on clint side
})
)
public DirectResult samplemethod()
{
//some code and finaly will return some data.
return this.Direct();
}
I want to call samplemethod from callDirectMethod and consume return data with. getData()
Last edited by Daniil; Dec 31, 2014 at 2:23 PM.
Reason: [CLOSED]