Based on several blogs, one of them is http://vibrantcode.com/blog/2012/4/10/whats-new-in-razor-v2.html/, ~/ resolution should work for all attributes.
Well, that's not working for me.
I have the following content in my Index.cshtml view:
<h2 data-test="~/">Index</h2>
<a href="~/">Test</a>
The generated html:
<h2 data-test="~/">Index</h2>
<a href="/">Test</a>
It resolves for the href attribute, but not for the data-test attribute.
Well, that's not working for me.
I have the following content in my Index.cshtml view:
<h2 data-test="~/">Index</h2>
<a href="~/">Test</a>
The generated html:
<h2 data-test="~/">Index</h2>
<a href="/">Test</a>
It resolves for the href attribute, but not for the data-test attribute.