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

Edited Issue: ModelMetadata lookup does not work correctly for complex types [200]

$
0
0
An example that showcases this:

With a Blog model that has a Comment property, which itself is a Comment model with a Text property, compare the results of

@Html.TextBoxFor(model => model.Comment.Text)

vs

@Html.TextBox("Comment.Text")

The latter will not have all the correct unobtrusive validation attributes emitted.
The problem seems to be ultimately occuring in ModelMetadata.FromStringExpression() where the passed in expression is the literal "Comment.Text" which is not being exploded into the individual segments. Not sure if this is an error in the implementation of this method or the way it's being called by the TextBox helper.

Viewing all articles
Browse latest Browse all 7215

Trending Articles



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