Hi @shilat shay ,
so I want instead of the return true to send it to aspx.cs
Based on your description, it looks like you want to send this result to the backend in WebForms project using javascript, right? If this is the case, you could use the ajax request with jquery.js to implement this requirement, like this:
And the WebMethod in asp.cs:
[WebMethod]
public static string MethodName(string name)
{
return "Hello " + name;
}
In addition, you need to set RedirectMode.Off
in RouteConfig.cs
. Something like this:
If I misunderstood anything on this question, please let me know.
Best regards,
Xudong Peng
If the answer is the right solution, please click "Accept Answer" and kindly upvote. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.