samedi 11 mars 2017

Url.Action to Html.Raw

I have this code om my View. And this is work good.

... onclick="location.href = '@Url.Action("Plan", "Care", new {Area = "HomeC"})'">

How Can I do the same code with Html.Raw? I tried this

...onclick= ' location.href = " + " ' " + Url.Action("Plan", "Care", new {Area = "HomeC"}) + " ' ' >" + "

With image all good, but link doesn't work. P.S. I added spaces that you can see where I put a single quotes

Aucun commentaire:

Enregistrer un commentaire