This is a migrated thread and some comments may be shown as answers.
Razor examples wrong
1 Answer 18 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
David Brenchley
Top achievements
Rank 1
David Brenchley asked on 07 Sep 2012, 03:59 PM
In your Razor upload async examples, it appears that the syntax is wrong.  I was not able to get them to work as is.



The examples usually have something such as



@(Html.Telerik().Upload()



       
.Name("attachments")



       
.Multiple((bool) ViewData["multiple"])



       
.Async(async => async



           
.Save("Save", "Upload")



           
.Remove("Remove", "Upload")



           
.AutoUpload((bool) ViewData["autoUpload"])



       
)



)



when really it needs to be below.  Notice the parentheses around async.  I'm still not sure why the example doesn't work.  Perhaps I am missing a dll reference.





@(Html.Telerik().Upload()



       
.Name("attachments")



       
.Multiple((bool) ViewData["multiple"])



       
.Async((async) => async



           
.Save("Save", "Upload")



           
.Remove("Remove", "Upload")



           
.AutoUpload((bool) ViewData["autoUpload"])



       
)



)

1 Answer, 1 is accepted

Sort by
0
Accepted
T. Tsonev
Telerik team
answered on 10 Sep 2012, 02:04 PM
Hi,

Both syntax options should work. The parentheses are required only when you specify the type of the lambda argument.

Missing assembly references can indeed be the cause of the problems you're experiencing. Please review the getting started instructions for a detailed walk-through.

Please be aware that the Telerik Extensions for ASP.NET MVC are superseded by Kendo UI. More information can be found here.

Kind regards,
Tsvetomir Tsonev
the Telerik team
Check out the successor of Telerik MVC Extensions - Kendo UI for ASP.NET MVC - and deem it for new ASP.NET MVC development.
Tags
Upload
Asked by
David Brenchley
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or