using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using testwebservies.ServiceReference1;
namespace testwebservies
{
public partial class login : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
ServiceReference1.MywebseriesSoapClient b = new MywebseriesSoapClient();
bool pass = b.Login(TextBox1.Text, TextBox2.Text);
if (pass)
{
Response.Write("p");
}
else {
Response.Write("f");
}
}
}
}
------------------webservies-----------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
namespace testwebservies
{
/// <summary>
/// Summary description for Mywebseries
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// 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 Mywebseries : System.Web.Services.WebService
{
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
[WebMethod]
public bool Login(string name, string password)
{
bool n= false;
if (name == "adeel" && password == "123")
{
n = true;
}
else
{
n =false;
}
return n;
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using testwebservies.ServiceReference1;
namespace testwebservies
{
public partial class login : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
ServiceReference1.MywebseriesSoapClient b = new MywebseriesSoapClient();
bool pass = b.Login(TextBox1.Text, TextBox2.Text);
if (pass)
{
Response.Write("p");
}
else {
Response.Write("f");
}
}
}
}
------------------webservies-----------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
namespace testwebservies
{
/// <summary>
/// Summary description for Mywebseries
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// 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 Mywebseries : System.Web.Services.WebService
{
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
[WebMethod]
public bool Login(string name, string password)
{
bool n= false;
if (name == "adeel" && password == "123")
{
n = true;
}
else
{
n =false;
}
return n;
}
}
}
No comments :
Post a Comment