Guest User

Untitled

a guest
Jun 20th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. <img src="/barchart.aspx?width=1024&height=768&chartId=50" >
  2.  
  3. public class ImageGeneratorController : Controller {
  4. public ActionResult BarChart(int width, int height, int chartId) {
  5. // ASP.NET MVC will map the request parameters to method arguments
  6. }
  7. }
  8.  
  9. Url.Action("BarChart", "ImageGenerator", new {
  10. width = 1024,
  11. height = 768,
  12. chartId = 50
  13. });
  14.  
  15. /ImageGenerator/BarChart?width=1024&height=768&chartId=50
  16.  
  17. public FileResult BarChart(int width, int height, int chartID) {
  18. //create the chart
  19. return new FileContentResult(byte[] fileContents, string contentType);
  20. }
  21.  
  22. <img src="/yourController/BarChart/1024/768/50">
Add Comment
Please, Sign In to add comment