0

I am very new to asp.net MVC.

I need to create dnd file "component". It allows user to upload file to server using DnD, the upload is done via webAPI. I am using FileModel here, for example, webApi also returns FileModel (to show uploaded file info on page). I did this part.

However, I did it in the "TestView". I need ability to add this "component" to any view on my project. Unfourtunately I do not have knowledge enough to do this.

I have found out that there are PartialViews. Should I just move my "TestView" to some "FileUploadPartialView"? What problems this will cause? How this affect the usage of FileModel?

4

1 回答 1

1

部分视图就像一个 javascript 包含。你不应该有任何麻烦。

只要把它放在你需要有局部视图的地方......

@Html.Partial("_FileUploadPartialView")

如果您需要更多详细信息,请告诉我。

于 2013-10-31T12:44:19.297 回答