Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do i get a Request Object outside a controller in asp.net mvc2

Is there a way to get the Request Object in a Html Helper Method.

I'd like to know if a file exists to replace non existent Files with a default Image. Therefore i need the Request Object and it's Method MapPath(path).

Has anybody an idea.

Thx Thomas

like image 883
Thomas Poth Avatar asked Feb 26 '23 14:02

Thomas Poth


1 Answers

System.Web.HttpContext.Current.Request

like image 139
Tuomas Hietanen Avatar answered Apr 29 '23 04:04

Tuomas Hietanen