Hi, i'm a Junior .Net Developer! when I create a webmethod within the codebehind file for the page and I try to call it using PageMethods.SomeFunction() I get a javascript error on stating: PageMethods is undefined. What's going on? Am I possibly missing a line in my web.config file? everything works on my localhost!
heres my javascript code: CallMe('http://rhealleb.w01.Winhost.com/Text/LaRecette01.txt'); function CallMe(FileName) { PageMethods.GetLyrics(FileName, CallSuccess, CallFailed); } function CallSuccess(res) { if (res == null || res == "") { res = "Pas Disponnible"; } $('#Song-Lyrics').append(res); } function CallFailed(res) { res = "Pas Disponnible"; $('#Song-Lyrics').append(res); } and my code behind: [System.Web.Services.WebMethod] public static string GetLyrics(string fileName) { my code! }