.NET MVC: How to use .NET controls with MVC?

て烟熏妆下的殇ゞ 提交于 2019-12-11 11:28:38

问题


I am very new to MVC.
I've been learning to use plain HTML or HtmlHelpers, eg. for textbox, and get the value back in the Controller using Request.Form.

But how do I use .NET controls with MVC? (eg. FileUpload)

(The reason I ask is I am trying to use a custom control for uploading multiple files - it's Flajaxian File Uploader, if anyone knows about it.
It works with webforms, but I have no idea how this thing is gonna work with MVC.)

Thanks in advance


回答1:


Further to what @Jon said this one seems to be pretty popular.

uploadify

Also try this for a list of multi file upload plugins.




回答2:


You won't be able to use regular ASP.NET controls on MVC, because all of these are dependent on the ASP.NET Page Lifecycle, which MVC explicitly avoids.

Your best bet is to check out various jQuery controls and use those for your web application.



来源:https://stackoverflow.com/questions/2444660/net-mvc-how-to-use-net-controls-with-mvc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!