Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

How can I return image from controller asp.net

[AcceptVerbs(HttpVerbs.Get)]
[OutputCache(CacheProfile = "CustomerImages")]
public FileResult Show(int customerId, string imageName)
{
    var path = string.Concat(ConfigData.ImagesDirectory, customerId, "", imageName);
    return new FileStreamResult(new FileStream(path, FileMode.Open), "image/jpeg");
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# execute shell command 
Csharp :: 1 line if c# 
Csharp :: c# and in if statement 
Csharp :: raycasthit unity 
Csharp :: if file exist rename c# 
Csharp :: switch expression c# multiple cases 
Csharp :: sleep in c# 
Csharp :: asp.net core mvc jsonresult example 
Csharp :: show snackbar without scaffold flutter 
Csharp :: hcf of numbers 
Csharp :: c# readline char 
Csharp :: font dialog c# code 
Csharp :: c# get all namespaces in assembly 
Csharp :: c# bubble sort 
Csharp :: multiplication of long number 
Csharp :: an existing connection was forcibly closed by the remote host. .net core 
Csharp :: C# async to sync 
Csharp :: c# select a row from datagridview by value 
Csharp :: c# get function name 
Csharp :: print all complete object in list c# 
Csharp :: unity reference textmeshpro 
Csharp :: get selected item datagrid wpf 
Csharp :: winforms how to check for enter key 
Csharp :: mvc session key exists 
Csharp :: type or namespace text could not be found unity 
Csharp :: web page search c# 
Csharp :: how to create function in c# 
Csharp :: initialize a char array java 
Csharp :: static class can have non static member in c# 
Csharp :: unity position ui element 
ADD CONTENT
Topic
Content
Source link
Name
1+6 =