Hi - Love the book so far, found a couple of errors here and there but noticed that they were addressed in the forums.
I may be pedantic but I am not sure I understand the reason for this code:
Code:
@helper Selected(string option, string value){
if(HttpContext.Current.Request[option] != null){
var values = HttpContext.Current.Request[option].Split(',');
if(values.Contains(value)){
<text>selected=\âselected\â</text>
}
}
}
What's the point of selected=\"selected\" there?
When I look into source code I see something like
Code:
<option selected=\"selected\">
To my knowledge (and that means days from diving into HTML 15+ yrs ago) <option selected> is the right form according to W3C.
So I used the following instead
Code:
// This seem to work just fine
// <text>selected</text>
// and this works as well
@:selected
End result is
<option selected>
Pretty much the same deal with Checked helper.
Am I missing something?
Thanks!