0
现在面临一个问题,通过参数化的URL发布从我Entires数据发布,我不知道为什么它的发生,网址张贴后返回一定的消息,下面是我的网址:的Http在Xamarin.Forms
,这是怎么了我发布的数据:
void OnSubmitReport(object sender, System.EventArgs e)
{
PostData();
}
public async void PostData()
{
string details = report_details_entry.Text;
string date = nextappointment_entry.Text;
var formContent = new FormUrlEncodedContent(new[]
{
new KeyValuePair<string, string>("unm", USERNAME),
new KeyValuePair<string, string >("assinID", ""+ASSIGNID),
new KeyValuePair<string, string>("details", details),
new KeyValuePair<string, string>("appoi_date", date)
});
var response = await client.PostAsync("http://bbs.eamobiledirectory.com/Mobile/MobileApi.aspx?Action=NewSalesReport",formContent);
}
我想是在条目提交数据后,病房我在DisplayAlert消息中返回的消息。
您的例子显示了一个GET ,而不是POST。你确定你需要使用POST吗?代码中的参数名称也与示例url中显示的名称不匹配。 – Jason
是的,我想发布@Jason –