I need to send model parameter from div to script. This is my not working .cshtml file

```
@model List<Dialog>
@foreach (Dialog dialog in Model)
{
    <div onclick="SelectDialog(@dialog)"></div>
}
<script>
    function SelectDialog(dialog) {
        //work with dialog
    }
</script>

```

How can I send current dialog from view to script?