0

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

Gaurav
  • 557
  • 4
  • 11
  • 28

1 Answers1

0

Try

YourService.ServiceSoapClient _CurrentSrv = new YourService.ServiceSoapClient();
_CurrentSrv.Get_User_Info(YourId);
kostas ch.
  • 1,960
  • 1
  • 17
  • 30
  • now it is showing my method. thanks, could you please brief about ServiceSoapClient ? why we need this? – Gaurav Jun 11 '13 at 07:05
  • You inititialize your service object throught that. If the answer meet your needs point as accepted :). Also you can see this link http://msdn.microsoft.com/en-us/library/ms996507.aspx – kostas ch. Jun 11 '13 at 07:15