JQuery Load function - of a .cshtml file gives internal server error
<p>I have the following jquery script  </p>

<pre><code>$('#scrollPages').load('WizardDemographicsTemplate.cshtml',
                                function (response, status, xhr) {
                                    if (status == "error") {
                                        alert(xhr.statusText);
                                    }
</code></pre>

<p>If I remove the line  @Html.TextBoxFor(x => x.UserName, new { size = "30" })
from  'WizardDemographicsTemplate.cshtml' below the file loads fine else it gives an internal server error. Could someone please throw some light on this.</p>

<p>----'WizardDemographicsTemplate.cshtml'  file</p>

<pre><code>  @model MVC3MobileApplication.Models.SimpleFormModel  
&lt;div id="ApplicantInfo" class="page ApplicantDemographics"&gt;
        &lt;div id="ApplicantName" class="required"&gt;
            &lt;input type="checkbox" /&gt;
            Applicant's Name (Please Print: First, Middle Initial, Last)
            @Html.TextBoxFor(x =&gt; x.UserName, new { size = "30" })
         &lt;/div&gt;
</code></pre>

<p>Thanks</p>
