Onclick call function.
<a href="javascript: void(0);" @onclick="@(e => OpenProductViewer(product.Id))">@product.Name</a>
public void OpenProductViewer(string pId)
{
}
Onclick using div
<div @onclick="@(e => AttachmentClicked(Convert.ToInt32(item.OrderId)))"><i class="fa fa-file-o"></i></div>
public void AttachmentClicked(int pPurchaseOrderId)
{
Console.WriteLine("attachment clicked");
}
Comments