using Variable property Name with Razor MVC
<p>I am trying to have all the models used for specific searches into one Generic search view. </p>

<p>I need to render only some of the fields in the model, either with something similar to this : (Psudo code)</p>

<pre><code>foreach (string  textBoxFieldName in  TextBoxFieldNames)
    {
      Html.Toolbox_TextBoxFor(m =&gt; m.textBoxFieldName)
    }
</code></pre>

<p>or having attributes on the model and checking when that attribute applies e.g. 
in the model I'll have something like this :</p>

<pre><code>[AppliedCases("Case1","Case4","Case77")]
[ControlToUse("TextBoxFor")]
public string LastName { get; set; }
</code></pre>

<p>And some how in the view will be able to go trough all the properties check that if the CurrentCase is one of the AppliedCases of the Model property and if so then use the Razor magic display it accordingly </p>

<p>My question is this correct approach and if so how do I implement it, looking for some examples with dynamic rendering (if that is the name of this topic)</p>