c# - Showing file on browser -
i want have 2 links download , view files
i able download file directly. if user selects view option want open file in browser new tab.
how in asp.net mvc?
for download have below action
public fileresult document() { return file(filepath, contenttype,filename); }
you can't control whether or not file opens in new tab or existing tab server, controlled setting target
attribute on link definition.
you can control whether browser downloads or attempts display file setting content type.
Comments
Post a Comment