Frage

For some reason I cannot get hyperlinks to work in my partial views. This works in the parent view:

    <div class="col-md-12">      
       <a href="http://google.com">Google</a>
       @Html.Partial("~/Views/_SomePartialView.cshtml")
    </div>

But when I move the <a> element into the partial view, even if it is the only thing in the partial view, I cannot click on it. It renders in the source code, but it is not clickable as if there is another element overlayed.

I am assuming that I am not fully understanding the functionality of partial views.

Any help would be appreciated.

War es hilfreich?

Lösung

This was not an issue with the Partial Views, rather malformed "bootstrap" elements. I Added a new column when I should have added a new row, thus throwing off the HTML and breaking the hyperlinks.

As for my troubleshooting stated above, I must have placed the placed the <a href="google.com>google</a> prior to the malformed "bootstrap" element.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top