vb.net - How to call function in my dll from jquery -


My question is simple, I want to call my dll function via jquery.

I am trying the following

$ (window) .load (function () {

  $ .ajax ({type "Post", url: "RemotePaymentdll / Class1 / CheckPending", data: '{}', contentType: "application / json; charset = utf-8", datatype: "json", success: warning ("success"), Error: Warning ("Error")})   

})

The function in my dll is

<> < Code> Public Shared Sub-CheckPending () Dim aaa = "End End"

I just want to be able to use CheckPending () Former> my How can I do this with jquery?

I have a http handler I recommend making a server side work to use, you can call it via javascript:

You can create an .asx file with some code like this: < / P>

  & lt;% @ WebHandler language = "VB" category = "Mythhandler"% & gt; Import System Import System.Web Import System.IO Imports System.Data.SqlClient Import System.Data Import System.Xml Public Class MyTestHandler: Implements IHttpHandler Private ReadOnly property parameter 1 () is found in the form of integer, IsNothing (HttpContext. After returning CInt (HttpContext.Current.Request.QueryString ("Parameter 1")) or else return -1 end from end to second end property public Sub ProcessRequest (ByVal reference HttpContext Get the form) IHttpHandler.ProcessRequest implies context.Response. Clear () context.Response.Buffer = True context.Response.Expires = -1 context.Response.Write ("Your output here") context.Response.Flush () context.Response.End () End Sub People ReadOnly Asset IsReusable () Boolean Implements IHttpHandler.Is re-usable Return End End End Ending Property End Class    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -