c# - ajax post does not send data -
i have ajax-post:
$.ajax({ url: config.proxy + "contentpages.aspx?t=save", type: "post", contenttype: "application/x-www-form-urlencoded", data: { content: content, id: currentpageid, active: "true", subject: $('#txtsubject').val(), webid: webid }, success: function (data, status) { // }, error: function (xhr, desc, err) { // } });
i post .net page, use debug mode check if data send correctly. use same code above different page (other url, other data).
when run application , save data don't come in debug mode. when use same code other page, works fine.
i tried compare both codes, same. have removed data-items, still not work.
why? can give me hint?
thanks
- edit * know why happening: ckeditor. set variable "content" content of ckeditor , use post-call, debug-mode not called anymore. form-keys in code-behind 0. question how fix this?
like said in edit of original post: problem caused content of ckeditor. think html not parser/loaded/call-it-what-you-want in ajax-post. so, little (and without posting code-behind, had nothing problem) figured out:
var content = escape(ckeditor.instances.editor1.getdata());
put variable "content" in data-section of post , voila! works charm.
on receiving .net page in code behind, decode value:
(httputility.urldecode(request.form.get("content").nullsafestring())
thanks anyway
Comments
Post a Comment