Dear Sir / Madam,
I have small doubt regarding web service in asp.net....
i have created a web service in my asp web application..
here i added a sample web service code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
/// <summary>
/// Summary description for Sample
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
// [System.Web.Script.Services.ScriptService]
public class Sample: System.Web.Services.WebService {
public Sample() {
//Uncomment the following line if using designed components
//InitializeComponent();
}
[WebMethod]
public string HelloWorld() {
return "Hello sijon.......";
}
[WebMethod]
public string HelloWorld1() {
return "Hello sijon.......";
}
}
here i added 2 web method....
my aim is to call web method1 when i browse sample.asmx service...
i need to access the webmethod1 whenever i call webservice......
when i browse the below link
http://localhost:10808/Web/sample.asmx
it list out the available webmethods, then i need to click invoke then only the webmethod will work... i need to work my webmethod1 by defualt when the webservice loads same like page load event in asp page....
how can i call webservice method in service loading.. or tell me the same event(page loading event in asp pages) in web service..
thanks in advance...