This is a migrated thread and some comments may be shown as answers.

[Solved] asp.net mvc 4 upload

1 Answer 45 Views
Upload
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Brian Edomm
Top achievements
Rank 1
Brian Edomm asked on 22 Mar 2012, 05:01 PM
I've got an upload control in a view and it is creating the html for the control, but it doesn't appear the client script that sets up the functionality on the client is getting emitted. I'm using the asp.net mvc 4 beta and the 2012.1.214 mvc extensions release from nuget.

View
@(Html.Telerik().Upload().Name("products")
    .Multiple(true)
    .Async(async => async.AutoUpload(false)
        .Remove("Remove", "Attachments")
        .Save("Save", "Attachments"))
)

I had to put this on the page manually to get it to work.
jQuery('#products').tUpload({ async: { "saveUrl": "/Attachments/Save", "removeUrl": "/Attachments/Remove", "autoUpload": true} });



1 Answer, 1 is accepted

Sort by
0
Brian Edomm
Top achievements
Rank 1
answered on 22 Mar 2012, 05:47 PM
Never mind, I missed the part in the docs about needing a scriptregistrar on the page.
Tags
Upload
Asked by
Brian Edomm
Top achievements
Rank 1
Answers by
Brian Edomm
Top achievements
Rank 1
Share this question
or