I have a WebService
WebService1 with a method GetAssetDetailsData takes 2 parameters strAssetId and strMfg_Sr_No like the following method
[WebMethod]
public DataTable GetAssetDetailsData(string strAssetId, string strMfg_Sr_No)
{
DataTable dtGetAssetDetails = new DataTable();
dtGetAssetDetails.TableName = "AssetDetails";
// My coding to get data
return dtGetAssetDetails;
}
For consuming this service I have a windows form application takes data parameters in textbox and show data in Datagrind on button click.
private void button1_Click(object sender, EventArgs e)
{
AssetDetailsService.WebService1 ser = new AssetDetailsService.WebService1();
DataTable dt = ser.GetAssetDetailsData(textBox1.Text.Trim(), textBox2.Text.Trim()); //Getting error at this line
dataGridView1.DataSource = dt;
}
On button click I got this error
path property must be set before calling the send method web service I followed this SO Question but didn't find solution Web Service Error path property must set before calling the send method