简体   繁体   English

发送日期至 wcf rest 服务

[英]Send date to wcf rest service

I am calling wcf rest service from javascript through jquery ajax call and my service body style is bare.我正在从 javascript 到 jquery ajax 呼叫 wcf rest 服务,我的服务主体风格是裸露的。 For some reason I cannot add body style wrapped.出于某种原因,我无法添加包裹的主体样式。 I want to send the date parameter to service.我想将日期参数发送到服务。 Please some body help.请一些身体帮助。

I don't know whether its best solution, but solved it by using Class with class member DateTime.我不知道它是否是最佳解决方案,但通过使用 Class 和 class 成员 DateTime 解决了它。 ie IE

Class SampleClass{
    private DateTime _sampleDate;
    public DateTime SampleDate
    {
        get
            {
                return _sampleDate;
            }
            set
            {
                _sampleDate= value;
            }
    }

}

Used the above obejct to pass the date.使用上述对象传递日期。

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

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