Scenario:
I have a Gridview with some records which read from SQL Database, each record of Gridview has a button that use CommandName
and CommandArgument
with sending '<%#Eval("UserId")%>'
to detecting each record with calling them in code behind (CS).
Goal:
I want to use entity command to when i click on the button (DO_PRINT(LinkButton)
), the crystal report pop up showing content of just same record.
Gridview like this:
UserId Name LastName OfficeId Print
100 Hassan Hosseini 1 DO_PRINT(LinkButton)
200 Brad Pitt 2 DO_PRINT(LinkButton)
db.Users.ToList()
you get a single user using something like this:db.Users.Where(x=>x.UserId == id)
where the id is something that you receive from query string or route values when someone clicks on the link. – Reza Aghaei