The Controller class exposes Request and Response properties that can be accessed in an action method. These properties have the same semantics as the HttpRequest and HttpResponse objects that are already a part of ASP.NET.
However, the Request and Response objects of the Controller class accept objects that implement the HttpRequestBase and HttpResponseBase abstract classes instead of being sealed classes.
Sample code
public void Detail()
{
int id = Convert.ToInt32(Request["id"]);
}
1 comment:
Thanks Robert.
Post a Comment