1
我有一堆[System.Web.Services.WebMethod],我用jQuery調用以提供ajax功能。有沒有從我的代碼隱藏文件中調用它們?如何在不使用javascript的情況下從Asp.Net調用WebMethod
含義我有一個文件下面的WebMethod稱爲DeleteImages.aspx.cs
[System.Web.Services.WebMethod]
public static string deleteImage(int id, int itemID, string fileName)
{
string deleteSQL = "DELETE FROM tItemsFiles WHERE [email protected]";
//run sql command
}
是有辦法,我可以打電話從不同的代碼隱藏文件的WebMethod這樣,即CreateImage.aspx.cs