Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Edited Unassigned: Razor V2 & V3-beta2 : Issue with parsing bool value in HTML tag attribute [1159]

$
0
0
From Razor V2 onwards, I have noticed issue while parsing bool value with HTML tag attribute. Issue reproduced only when we are parsing bool value as HTML tag attribute. Please have a look at below code snippet and output i.e. rendered HTML.

__Code Snippet__
@{
bool trueVal = true;
bool falseVal = false;
}
@trueVal | @falseVal | <input type="text" value="@trueVal" /> | <input type="text" value="@falseVal" />

__Razor V1 Output__
True | False | <input type="text" value="True" /> | <input type="text" value="False" />

__Razor V2 & V3-beta2 Output__
True | False | <input type="text" value="value" /> | <input type="text" />
In above V2 & V3-beta2 output we can see that it is rendering __value="value" for bool True, while for bool False it is not rendering value attribute at all__ Ideally it should be value="True" and value="False" respectively.

__UPDATE__
Ironically it is __working fine for data-*** attribute__ in Razor V2 & V3-beta2 as well!

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>