L
Lupakkiotto
Hi! I am a newbye about asp.net and I would like to know where I am wrong
doing this thing...
I have a webservice HelloWorldService.asmx with this code:
<%@ WebService Language="VB" Class="Samples.AspNet.HelloWorldService" %>
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
Namespace Samples.AspNet
<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
Public Class HelloWorldService
Inherits System.Web.Services.WebService
Public pippo As String
<WebMethod()> _
Public Sub HelloWorld(ByVal query As String)
pippo = query
End Sub
<WebMethod()> _
Public Function Hello() As String
Return pippo
End Function
End Class
End Namespace
---
Then I have a simple Default3.aspx web page with a button and a textbox.
This is the code:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim xxx As New localhost.HelloWorldService
xxx.HelloWorld("pippone")
TextBox1.Text = xxx.Hello
End Sub
When I click the button I think that webservice is called and then it
returns the string "pippone" in textbox1.. but nothing...
Where I am wrong??
Thanks in advance,
Marco
doing this thing...
I have a webservice HelloWorldService.asmx with this code:
<%@ WebService Language="VB" Class="Samples.AspNet.HelloWorldService" %>
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
Namespace Samples.AspNet
<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
Public Class HelloWorldService
Inherits System.Web.Services.WebService
Public pippo As String
<WebMethod()> _
Public Sub HelloWorld(ByVal query As String)
pippo = query
End Sub
<WebMethod()> _
Public Function Hello() As String
Return pippo
End Function
End Class
End Namespace
---
Then I have a simple Default3.aspx web page with a button and a textbox.
This is the code:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim xxx As New localhost.HelloWorldService
xxx.HelloWorld("pippone")
TextBox1.Text = xxx.Hello
End Sub
When I click the button I think that webservice is called and then it
returns the string "pippone" in textbox1.. but nothing...
Where I am wrong??
Thanks in advance,
Marco