Skip to content

Instantly share code, notes, and snippets.

@rytmis
Forked from Tigraine/Thisworks.cshtml
Created May 30, 2011 13:30
Show Gist options
  • Save rytmis/998898 to your computer and use it in GitHub Desktop.
Save rytmis/998898 to your computer and use it in GitHub Desktop.
Razor weirdness
<h2>Create</h2>
@using(Html.BeginForm()){
@Html.Partial("form");
}
<h2>Create</h2>
@using(Html.BeginForm()){
Html.RenderPartial("form");
}
@Tigraine
Copy link

It works.. Thanks a lot!

I figured something like that.. But I didn't assume that razor would pick up on a simple Html.RenderPartial call within my markup .. I fully expected @ to simply start a code block..

Thanks..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment