I have created this web service
using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Service : System.Web.Services.WebService
{
public Service () {
//Uncomment the following line if using designed components
//InitializeComponent();
}
[WebMethod]
public string user(string strusername, string strpassword)
{
string user = "";
Console.WriteLine("Geusts leave boxes blank");
if ((strusername == "paul") && (strpassword == "paul"))
{
user = "Overall Co-Ordinator";
}
if ((strusername == "lisa") && (strpassword == "lisa"))
{
user = "Overall Food Coordinator";
}
if ((strusername == "rob") && (strpassword == "rob"))
{
user = "Overall Programme Coordinator";
}
if ((strusername == "") && (strpassword == ""))
{
user = "Guest";
}
return user;
}
[WebMethod]
public string HelloWorld() {
return "Hello World";
}
}
I need to use it on a login page on a web-page.
Then each user has a different page they are taken too.
i.e. Overall Co-Ordinator see's the whole of my created database on his/her own page. and food co ordinator can only veiw the food part of my database etc.