Created
November 15, 2011 05:42
-
-
Save JoshClose/1366268 to your computer and use it in GitHub Desktop.
Dynamically Loading Partial Views with the Spark View Engine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<use file="MyPartialView" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<MyPartialView /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Html.RenderPartial( myPartialViewVariable ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul> | |
<li each="var item in items"> | |
#ViewData["item"] = item; | |
#Html.RenderPartial( "path/to/" + item.Name ); | |
</li> | |
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<viewdata item="Item" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment