Beispiel #1
0
        public static void PostComplexToMVC(string url, Dictionary formData, AjaxRequestCallback <object> ajaxRequestCallback)
        {
            //jQueryAjaxOptions ajaxOptions = new jQueryAjaxOptions();
            //ajaxOptions.Url = AppendUrlTimeStamp(url);
            //ajaxOptions.Type = "POST";
            //ajaxOptions.DataType = "json";
            //ajaxOptions.ContentType = "application/json; charset=utf-8";
            //ajaxOptions.Data = Json.toJSON(data);
            //ajaxOptions.Success = ajaxRequestCallback;
            //jQuery.Ajax(ajaxOptions);
            Postify mvcPostify = new Postify();
            object  data       = mvcPostify.CreatePropertyObject(formData);
            object  postData   = mvcPostify.Parse(data, 10);

            Logging.Debug("Posting Complex Data Object for Asp.net MVC", new object[] { postData });
            jQuery.Post(AppendUrlTimeStamp(url), postData, ajaxRequestCallback);
        }
Beispiel #2
0
        public static void PostComplexToMVC(string url, Dictionary formData, AjaxRequestCallback<object> ajaxRequestCallback)
        {
            //jQueryAjaxOptions ajaxOptions = new jQueryAjaxOptions();
            //ajaxOptions.Url = AppendUrlTimeStamp(url);
            //ajaxOptions.Type = "POST";
            //ajaxOptions.DataType = "json";
            //ajaxOptions.ContentType = "application/json; charset=utf-8";
            //ajaxOptions.Data = Json.toJSON(data);
            //ajaxOptions.Success = ajaxRequestCallback;
            //jQuery.Ajax(ajaxOptions);
            Postify mvcPostify = new Postify();
            object data = mvcPostify.CreatePropertyObject(formData);
            object postData = mvcPostify.Parse(data, 10);

            Logging.Debug("Posting Complex Data Object for Asp.net MVC", new object[] { postData });
            jQuery.Post(AppendUrlTimeStamp(url), postData, ajaxRequestCallback);
        }