Click here to Skip to main content
15,881,833 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I am using the web Grid. I want to define an action link information from the control function that I define the show.
For example, shiw 20 . But want the function of the control value of 20 Show
this show table
id count_pic name
1 20 ali
2 25 saeed
3 50 jan

i want count_pic call function on control
C#
  [HttpGet]
public ActionResult countpic(int? page)
{
  var model = db.gallerys.Where(x=>x.ID_GGallery==page).Count();

  return View(model);
}

HTML
grid.Column(
              "test",
                        (grid.SortColumn == "test" ? (grid.SortDirection == SortDirection.Ascending ? " ▼" : "▲") : ""),
         format:
         @<text>
                 
             @Html.ActionLink("my function",
                                 "countpic", "Gallery", new { id = item.ID_GGallery }, null)
                         
         </text>,   style: "IDWith"),
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900