views:

345

answers:

0

Hello,

I'm currently trying to get MVC2 and Spark to work happily. Everything looks great, however I can't for the life of me get Html.BeginForm to write out the form tags. My code is:

#Html.BeginForm();
 <div>
   <fieldset>
     <legend>Account Information</legend>

     <div class="editor-label">
       ${Html.LabelFor(m => m.UserName)}
     </div>
     <div class="editor-field">
       ${Html.TextBoxFor(m => m.UserName)}
       ${Html.ValidationMessageFor(m => m.UserName)}
     </div>

     <div class="editor-label">
       ${Html.LabelFor(m => m.Password)}
     </div>
     <div class="editor-field">
       ${Html.PasswordFor(m => m.Password)}
       ${Html.ValidationMessageFor(m => m.Password)}
     </div>

     <div class="editor-label">
       ${Html.CheckBoxFor(m => m.RememberMe)}
       ${Html.LabelFor(m => m.RememberMe)}
     </div>

     <p>
       <input type="submit" value="Log On" />
     </p>
   </fieldset>
 </div>
#Html.EndForm();

Any help on this would be great. You can grab the whole code from: http://github.com/BenHall/MVC2_Spark_Example

Thanks