How to get pagemthods value in the calling function
<p>I want to fetch current year from the server using PageMethods but PageMethods returns result in different function but i want to get the return value in the same function where PageMthods is called. Is it possible?</p>

<pre><code>function GetYear()
{
     dr["OrderYear"] = PageMethods.GetCurrentYear(Onsuccess);
}

function Onsuccess(currYear)
{
   alert(currYear);
}

 [WebMethod]
    public static string GetCurrentYear()
    {
        return DateTime.Now.Year.ToConvertedString();
    }
</code></pre>

<p>I want currYear to be assigned to  dr["OrderYear"] which is actually  a calling function</p>
