开发者

How to open the file using FileDialog and display the path into textbox in asp.net mvc?

How to open the file using FileDialog and display the path开发者_运维问答 into textbox in asp.net mvc?


use <input type="file" name="imageFile" />

on the controller for your POST method include this HttpPostedFileBase imageFile

if (imageFile != null && imageFile.ContentLength > 0)
{
    var fileName = Path.GetFileName(imageFile.FileName);
    var fileExtension = Path.GetExtension(imageFile.FileName);
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜