Question

I have made a web-service which'd give me the User Information.

[WebMethod]
public void Get_User_Info(string uid)
{
    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["contest"].ConnectionString);
    SqlCommand com = new SqlCommand("select * from mtblUser where UserId=@UserId", con);
    com.CommandType = CommandType.Text;
    com.Parameters.Add("@UserId", SqlDbType.NVarChar, 50).Value = uid;
    SqlDataAdapter sda = new SqlDataAdapter(com);
    DataTable dt = new DataTable();
    sda.Fill(dt);

}

this web service is having 1 method Get_User_Info(). but when I try to use this method the namespane show 4 methods like below

Get_User_InfoRequest

Get_User_InfoRequestBody

Get_User_InfoResponse

Get_User_InfoResponseBody

how can I use my method please help.

enter image description here

Was it helpful?

Solution

Try

YourService.ServiceSoapClient _CurrentSrv = new YourService.ServiceSoapClient();
_CurrentSrv.Get_User_Info(YourId);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top