Click here to Skip to main content
15,900,110 members
Home / Discussions / Web Development
   

Web Development

 
QuestionJquery fuction not called when I append achor tag . Pin
KGr2830-Oct-19 4:29
KGr2830-Oct-19 4:29 
AnswerRe: Jquery fuction not called when I append achor tag . Pin
Richard Deeming30-Oct-19 5:30
mveRichard Deeming30-Oct-19 5:30 
GeneralRe: Jquery fuction not called when I append achor tag . Pin
KGr2830-Oct-19 8:03
KGr2830-Oct-19 8:03 
AnswerRe: Jquery fuction not called when I append achor tag . Pin
Leanbridge Technologies1-Nov-19 22:24
professionalLeanbridge Technologies1-Nov-19 22:24 
QuestionLogin Information Pin
Member 1463762428-Oct-19 19:29
Member 1463762428-Oct-19 19:29 
AnswerRe: Login Information Pin
Richard MacCutchan28-Oct-19 21:54
mveRichard MacCutchan28-Oct-19 21:54 
QuestionGrabbing routeValues from ActionLink with jquery. Pin
KGr2828-Oct-19 9:12
KGr2828-Oct-19 9:12 
AnswerRe: Grabbing routeValues from ActionLink with jquery. Pin
ZurdoDev28-Oct-19 9:49
professionalZurdoDev28-Oct-19 9:49 
GeneralRe: Grabbing routeValues from ActionLink with jquery. Pin
KGr2828-Oct-19 9:52
KGr2828-Oct-19 9:52 
GeneralRe: Grabbing routeValues from ActionLink with jquery. Pin
Richard Deeming28-Oct-19 10:11
mveRichard Deeming28-Oct-19 10:11 
GeneralRe: Grabbing routeValues from ActionLink with jquery. Pin
KGr2828-Oct-19 10:34
KGr2828-Oct-19 10:34 
QuestionWeb API and SignlaR Test Pin
Kevin Marois16-Oct-19 6:18
professionalKevin Marois16-Oct-19 6:18 
QuestionWeb Site Log Out in Mozilla Firefox on Post back Pin
Siddharth Chudasama10-Oct-19 22:52
Siddharth Chudasama10-Oct-19 22:52 
QuestionRe: Web Site Log Out in Mozilla Firefox on Post back Pin
ZurdoDev28-Oct-19 9:50
professionalZurdoDev28-Oct-19 9:50 
QuestionHow to get uploaded file in ajax Post Pin
KGr283-Oct-19 4:17
KGr283-Oct-19 4:17 
Currently I want to grab the name of my uploaded file in Ajax and pass it to my APIController and pass it to my parameter.


1.Here is my controller :
public class ApiSampleUploadController : ApiController
   {


       [HttpPost]
       public string Test(HttpPostedFileBase file )
       {

           return "Success";
       }


   }



2.Here is my view:
@using (Html.BeginForm("Submit"))
 {
 /*code*/
     //FileUpload
       <div>
        <input type="file" name="file" id="uploadFile" />
      </div>
/*code*/
 }


3.Here is my ajax
$('#uploadFile').on("change", function () {
    var formdata = new FormData($('form').get(0));

    CallUpload(formdata);
});


function CallUpload(file) {
    console.log(file);
    $.ajax({
        url: '/api/ApiSampleUpload/Test',
        type: 'POST',
        data:  'file=' + file ,
        cache: false,
        processData: false,
        contentType: 'application/json',
        success: function () {
            alert('Success');
        },
        error: function () {
            alert('Error occured');
        }
    });
}

AnswerRe: How to get uploaded file in ajax Post Pin
Richard Deeming3-Oct-19 4:33
mveRichard Deeming3-Oct-19 4:33 
GeneralRe: How to get uploaded file in ajax Post Pin
KGr283-Oct-19 4:39
KGr283-Oct-19 4:39 
GeneralRe: How to get uploaded file in ajax Post Pin
Richard Deeming3-Oct-19 4:52
mveRichard Deeming3-Oct-19 4:52 
GeneralRe: How to get uploaded file in ajax Post Pin
KGr283-Oct-19 7:12
KGr283-Oct-19 7:12 
QuestionCall To test Web API Fails Pin
Kevin Marois1-Oct-19 10:35
professionalKevin Marois1-Oct-19 10:35 
AnswerRe: Call To test Web API Fails Pin
Afzaal Ahmad Zeeshan4-Oct-19 22:42
professionalAfzaal Ahmad Zeeshan4-Oct-19 22:42 
QuestionThe type or namespace name 'EigenObjectRecognizer' could not be found (are you missing a using directive or an assembly reference?) Pin
Fatemehhhhh29-Sep-19 20:55
Fatemehhhhh29-Sep-19 20:55 
AnswerRe: The type or namespace name 'EigenObjectRecognizer' could not be found (are you missing a using directive or an assembly reference?) Pin
Richard MacCutchan29-Sep-19 22:54
mveRichard MacCutchan29-Sep-19 22:54 
QuestionIIS issues for Core webAPi deployment Pin
Simon_Whale25-Sep-19 2:31
Simon_Whale25-Sep-19 2:31 
AnswerRe: IIS issues for Core webAPi deployment Pin
Richard Deeming25-Sep-19 2:51
mveRichard Deeming25-Sep-19 2:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.