I have a bunch of [System.Web.Services.WebMethod] that I call with jquery to provide ajax functionality. Is there to call them from my codebehind files?
Meaning I have the following WebMethod in a file called DeleteImages.aspx.cs
[System.Web.Services.WebMethod]
public static string deleteImage(int id, int itemID, string fileName)
{
string deleteSQL = "DELETE FROM tItemsFiles WHERE ID=@ID";
//run sql command
}
is there a way I can call this webmethod from a different codebehind file, ie CreateImage.aspx.cs