zahra
zahra

Reputation: 1

Server side data table in asp.net mvc

I have a server side Data Table without any attribute searching or sorting. And now I want to add these attribute.

According to the searches I have, I have to define variables in my controller like this:

   public int Start = Convert.ToInt32(Request["start"]);

But my controller does not understand the word Request and gives an error How can I resolve this error?

Upvotes: 0

Views: 332

Answers (1)

Asad
Asad

Reputation: 508

Have you included the System.Web assembly in the application?

using System.Web;

If not, try specifying the System.Web namespace, for example:

 public int Start = Convert.ToInt32(System.Web.HttpContext.Request["start"]);

Upvotes: 1

Related Questions