lundi 9 mars 2015

Calling http handler in user control



I'm trying to call httphandler in SharePoint usercontrol . I'm loading this usercontrol in a SharePoint web part. This httphandler is deployed to SharePoint layouts folder.


Below is my code . this.Page.Form.Action = "/_layouts/handler/FileHandler.ashx"; this.Page.Form.Method = "POST"; this.Page.Form.Enctype = "multipart/form-data";


On page load or button click event , my handler is called but context.Request.HttpMethod is always "GET" instead of "POST . It works fine in chrome but it is very inconsistent. But in explorer and chrome, it is always get method. I'm not sure where im going wrong . PLease guide me how can i make httprequest to be POST.








0 commentaires:

Enregistrer un commentaire