Link to home
Start Free TrialLog in
Avatar of PNRT
PNRT

asked on

ASP.Net, MVC, Razor, Button in Webgrid not firing

Hi Experts

ASP.Net, MVC, Razor, Webmatrix

I have a button in a webgrid and need to get the page and line when the button is clicked.
I get it with the text option below but it doesn't work with the button.

This works
grid.Column("", format:=@@<text>@item.GetSelectLink("View")</text>),
@if (grid.HasSelection)
Dim abc As WebMatrix.Data.DynamicRecord
abc = grid.rows(grid.selectedindex).value
aa = abc("id")
@RenderPage("~/updateproduct.vbhtml",aa)

This doesn't work
grid.Column("", format:=@@<button>@item.GetSelectLink("View Order")</button>),
@if (grid.HasSelection)
Dim abc As WebMatrix.Data.DynamicRecord
abc = grid.rows(grid.selectedindex).value
aa = abc("id")
@RenderPage("~/updateproduct.vbhtml",aa)

Many Thanks
ASKER CERTIFIED SOLUTION
Avatar of Mlanda T
Mlanda T
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial