Domanda

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

È stato utile?

Soluzione

Try

YourService.ServiceSoapClient _CurrentSrv = new YourService.ServiceSoapClient();
_CurrentSrv.Get_User_Info(YourId);
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top