Accessing data from Querystring to Action method

Posted by Manideepgoud under ASP.NET MVC category on | Points: 40 | Views : 2198
We can access data from querystring to action method using two ways
1.using parameter action method
2.using Request.QueryString.

public ActionResult Details(int id)
return View();

In the above code we accessed id QueryString with action method and name QueryString with Request.QueryString
View code

In the view code QueryString will be directly accessed using

Comments or Responses

Login to post response