.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Code Snippets >> Web Services >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Simple Demonstration of Utilising a Webservice

Posted By:Hefin Dsouza       Posted Date: August 14, 2009    Points: 10    Category: Web Services    URL: http://www.dotnetspark.com  
 

This code lets you utilize a webservice from an HTML page as well as an ASPX page.

CODE FOR CREATING THE SERVICE

_
Public Function HelloWorld() As String
Return "Hello World"
End Function

_
Public Function Notify(ByVal name As String) As String
Return "Hello " & name
End Function
CALL THROUGH HTML


TO CALL SERVICE HELLOWORLD



TO CALL SERVICE NOTIFY
NAME :




Call THROUGH ASPX.
Dont Forget to Add WebReffernce.

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim ser As New Service
Response.Write(ser.Notify(TextBox1.Text))
End Sub
Regards Hefin Dsouza

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend