简体   繁体   English

如何将数据集作为参数传递给 c# 中的另一个 url

[英]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.您不需要在 url 中将整个数据集作为参数传递。您只需在 url 中将数据集的唯一标识符作为参数传递,然后使用该标识符来获取所需的值。

Use HTTP POST method to post the data(Dataset) to the URL.使用 HTTP POST 方法将数据(数据集)发布到 URL。 You may need to use Newtonsoft JSON for serializing the Dataset.您可能需要使用 Newtonsoft JSON 来序列化数据集。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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