View Full Version : Web services e ASP.NET


chaOx
05-06-2007, 19:14
Boas pessoal,

Eu tou a tentar fazer um site k tenha estas 2 linguagens, para isso fiz uma simples pagina k lista valores de uma gridview, e criei 1 Web Service k permite executar as operaçoes de soma,divisao,subtraçao e multiplicaçao!

PublicClass FazerOperacoes : Inherits WebService
<WebMethod()> PublicFunction Somar(ByVal a AsInteger, ByVal b AsInteger) AsInteger
Return (a + b)
EndFunction

<WebMethod()> PublicFunction Multiplicar(ByVal a AsInteger, ByVal b AsInteger) AsInteger
Return (a * b)
EndFunction

<WebMethod()> PublicFunction Dividir(ByVal a AsInteger, ByVal b AsInteger) AsInteger
Return (a / b)
EndFunction

<WebMethod()> PublicFunction Diminuir(ByVal a AsInteger, ByVal b AsInteger) AsInteger
Return (a - b)
EndFunction


Agr gostaria de saber cmo e k na minha pagina .aspx invoco estas funçoes?ou seja passo valores da gridview p a funçao, ou entao passo da textbox para estas funçoes??

Espero k me tenha feito entender! :p

Agradeço a ajuda neste problema