For example when using a
@Html.TextBoxFor(v => Model.Text);
and submitting the form, the value in the TextBox is automatically assigned to Model.Text
.
I want to write such a custom HTML helper.
I know how to write such a extension method for displaying HTML, but how to program the behaviour to assign the value Model.WhatEver
.
I want to build a Tag-Cloud and I think it is a good idea to include it in a way like:
@Html.TagCloud(v => Model.SelectedTags, Model.AvailableTags)
The HTML-Helper just prints out HTML, but how can I assign values to Model.SelectedTags
?