I have a static function in the aspx page with this signature:
public static bool UserNeedsToBeAlertedPwdReset(out DateTime dtExpires)
{
DateTime dt = DateTime.MivValue;
return true;
}
So I want to call this function from the client side, using the jQuery Ajax. How do I get a hold of the out value?
Edit
Alternatevly I could check for nulls if this is possible with Ajax + jQuery like that:
public static DateTime? UserNeedsToBeAlertedPwdReset()
{
if(blah)
return null;
return DateTime.Now;
}
Why not create a function that returns a JSON response which you could include all the data you need.
I prefer to create .ashx handlers for these types of things and return a JSON response that is very to easy call and and handle client side.