Skip to content

Instantly share code, notes, and snippets.

@linuxbender
Created May 17, 2011 12:43
Show Gist options
  • Save linuxbender/976401 to your computer and use it in GitHub Desktop.
Save linuxbender/976401 to your computer and use it in GitHub Desktop.
MVC 3 - Razor - C# - RenderPage - Code snippe
<!-- run with params - Model and the ID state from the loop s.tblServiceID -->
@RenderPage("~/Views/Home/SummaryFormToDo.cshtml", new { Model, LogID = s.tblServiceID, Monitor = "Service" })
<!-- run without params from the context view -->
@RenderPage("~/Views/Home/SummaryForm.cshtml")
<!-- all manip with JQuery - her without jquery -->
<ul class="popupMenu">
<li>
<label>
<strong>Priority :</strong>
</label>
</li>
<li>
<select class="popupSelectP">
<option value="0">Select Priority</option>
</select>
</li>
<li>
<div class="SaveTask"><strong>Save</strong></div>
</li>
<li>
<div class="RemoveTask"><strong>Remove</strong></div>
</li>
</ul>
<div class="AssignTask" ><strong>ToDo</strong></div>
@foreach (var subModel in Page.Model)
{
<input type="hidden" name="tblToDoID" value="0" />
<input type="hidden" name="LogID" value="@Page.LogID" />
<input type="hidden" name="tblUnitID" value="@subModel.tblUnitID" />
<input type="hidden" name="tblUnitTypeID" value="@subModel.tblUnitTypeID" />
<input type="hidden" name="tblFactoryID" value="@subModel.tblFactoryID" />
<input type="hidden" name="tblMonitor" value="@Page.Monitor" />
<input type="hidden" name="tblExportDate" value="@Page.tblExportDate" />
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment