简体   繁体   中英

how to pass dataset as a parameter to another url in c#

private void import()
{  
  DataSet ds = new DataSet();  
  Export(ds);  
}

[WebMethod] 
public void Export(DataSet ds) 
{ 
    DataSet Ip_ds = new DataSet(); 
    Ip_ds = ds; // insert this data in table 
}

You dont need to pass a whole dataset as a parameter in the url.you can just pass the unique identifiers of the dataset as a parameter in the url and then use that identifier to get the required values.

Use HTTP POST method to post the data(Dataset) to the URL. You may need to use Newtonsoft JSON for serializing the Dataset.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM