本文介绍了VS 2015中的AJAX webmethod声明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近升级到VS 2015,现在我在使用VB声明AJAX webmethods方面遇到了麻烦,特别是下划线。


我有这个声明:

 Public Class AJAX 
Inherits System.Web.UI.Page
< System.Web.Services.WebMethod()>
Public Shared Sub opdaterVideoStat(ByVal playlist_id As Integer)
TV2BGlobal.opdaterVideoStatistik(playlist_id)
End Sub

End Class

据我所知,webMethod()>之后必须有一个下划线。为了这个工作,但是每次我尝试插入时,visual studio 2015会自动删除它。


我无法使用AJAX功能。



这是什么?


解决方案

I have recently upgraded to VS 2015, and I now have trouble with declaring AJAX webmethods using VB, specifically the underscore.

I have this declaration:

Public Class AJAX
    Inherits System.Web.UI.Page
       <System.Web.Services.WebMethod()>
    Public Shared Sub opdaterVideoStat(ByVal playlist_id As Integer)
        TV2BGlobal.opdaterVideoStatistik(playlist_id)
    End Sub
   
End Class

As I understand it there MUST be an underscore after the webMethod()> for this to Work, but visual studio 2015 automatically removes it every time I try to insert it.

And I cannot get the AJAX functionality to work.

I have another application which has been ported from VS 2012 to VS 2015, and in that app the underscore stays, and the AJAX functionality works.

Whats up with this?

解决方案


这篇关于VS 2015中的AJAX webmethod声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 03:12