Dec 14, 2011, 2:46 PM
DirectMethod returning a boolean
Hi!
I can't solve this...
I have a DirectMethod in the .aspx.cs page, let's suppose it's something like this:
In the .aspx page I have something like this:
In advance, thanks a lot for any help.
Regards,
Mark
I can't solve this...
I have a DirectMethod in the .aspx.cs page, let's suppose it's something like this:
[DirectMethod]
public bool validateNumbers(int number1, int number2)
{
if (number1==number2)
{
return true;
}
else
{
return false;
}
}
How can I use this DirectMethod returning a boolean in a script?In the .aspx page I have something like this:
<script type="text/javascript">
if(#{DirectMethods}.validateNumbers(4,4)){
message='ok';
} else {
message='!ok';
}
</script>
but, always returns false, I've seen some examples using "success" but I can't realize how to apply it to this case.In advance, thanks a lot for any help.
Regards,
Mark
Last edited by geoffrey.mcgill; Dec 14, 2011 at 3:55 PM.
Reason: please use [CODE] tags