mercredi 24 juin 2015

How to mix javascript with razor code

What the syntax to add the following javascript within my razor (chtml) template?

<script type="text/javascript">

 $(function(){ 
    @if(Model.IsModalShown)
    {
        $('#myModal').modal('show');
    }
 });

</script>

Aucun commentaire:

Enregistrer un commentaire