Created
November 7, 2012 15:09
-
-
Save DamianEdwards/4032153 to your computer and use it in GitHub Desktop.
Model binding to a dynamic object using an anon type as the "shape"
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
public partial class AdHocModelBindingAnonType : System.Web.UI.Page | |
{ | |
protected dynamic Model { get; private set; } | |
protected void Page_Load() | |
{ | |
Model = ModelBindingExecutionContext.Bind(new { FirstName = "" }); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment