[Solved] jQuery Ajax Error: Unknown WebMethod in ASP.Net

on Jul 06, 2022 11:26 PM

When I click on a row in the gridview it redirects to another page and shows this StartupScript Pop-up.

Unknown WebMethod GetFile

Display PDF in another page on ASP.Net GridView row Click using C# and VB.Net

Download FREE API for Word, Excel and PDF in ASP.Net: Download
on Jul 06, 2022 11:30 PM

Hi RichardSa,

Verify the method name you are passing to the Ajax Url and make sure the Method name is same in the code behind.

url: "Default.aspx/GetFile",


[WebMethod(EnableSession = true)]
public static object GetFile()