behavior.asmx

来自「聊天 聊天 聊天 聊天 聊天 聊天」· ASMX 代码 · 共 36 行

ASMX
36
字号
<%@ WebService Language="VB" Class="Behavior"%>
Imports System
Imports System.Web.Services
Imports System.Data
Imports System.Data.OleDb
Imports System.Text


Public Class Behavior: Inherits WebService
 <WebMethod()> Public  Function  TestFunction (vInput as Boolean) As String
	If (vInput = TRUE) Then
 	   TestFunction = "It is the truth..."	
	Else
	   TestFunction = "False!False!False"	
	End if 
   End Function

<WebMethod()> Public Function  add( a as integer, b as integer) as string
   add = cstr(a+b)
end function

<WebMethod()> Public Function Populate(ConnStr as string, SQL as string) As DataSet
	Dim dv as DataView
	Dim i as integer
	Dim myConnection As OleDbConnection
	Dim myCommand    As OleDbDataAdapter
	Dim ds           As New DataSet
	myConnection = New OleDbConnection(ConnStr)    
	myCommand = New OleDbDataAdapter(SQL, myConnection)
	myCommand.Fill(ds, "vTable")
	Populate = ds
End Function

End Class

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?