c# - asp.net | values sent trough ajax received as null in handler -


I am trying to send handler to the 'file' attachment (and send it with an email) < P> This is the code that I am using to send handler (js)

When I debug it, I see the correct values, including the file (debug in JavaScript).

  function sendCv_click () {var settings = {'data': getData ("sendCv"), 'url': "handler / sendwax", 'content type': 'wrong' , 'Processed': 'wrong'}; SendCV (settings); }; ('#fu_sendCv_upload') [0]. Files [0], 'Email': $ ($) ('# fu_sendCv_upload') '#txt_sendcv_email'). Val (), 'checkbox': $ ('# sendCv_chk box: check'). Length} function sendCV (settings) {$. AJAX ({type: "post", content type: settings.contentType, processData: Settings.processData, data: settings.data, url: settings.url, datatype: "json", success: function (data) {... }, Error: function (data, xhr) {...}); }) Always (function () {...}); }}   

How do I get them into a handler page?

It seems that I get them as a null, why?

  public zero process measure (HttpContext reference) {string fullName = context.Request.Form.Get ("fullName"); // This null string email = reference. request. Farm Gate ("email"); // this null string chkBox_ad = context.Request.Form.Get ("check box"); // This is the tap ///// How can I get the file here ?? Bull Melcentent = Mail. SDCV (full name, email, chkBox_ad); Context.Response.ContentType = "text / plain"; If (Mailset) {context.Response.Write ("true"); } Other {context.Response.Write ("wrong"); }}    

This can work ...

  Var Postfile = References request. Files [0];    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -