
Untitled
By: a guest on
Jun 26th, 2012 | syntax:
None | size: 0.90 KB | hits: 15 | expires: Never
Is '@model dynamic' valid in an ASP.NET MVC3 .cshtml page?
@model Livestream.LoginModel
<!DOCTYPE html>
<html>
<head>
<title>Remote Observation</title>
<link type="text/css" rel="stylesheet" media="all" href="/Content/CSS/main.css" />
</head>
<body>
@{
dynamic dave = "Sign In";
}
<div class='normal center'>
<p><img src='/Content/images/logo.png' /></p>
@using(Html.BeginForm("Login", "Main")) {
<div class='loginBox'>
<p>Username<br />@Html.TextBoxFor(m => m.Username)</p>
<p>Password<br />@Html.PasswordFor(m => m.Password)</p>
<p><input type='submit' value='@dave'></p>
</div>
}
</div>
<script>
document.getElementById('Username').focus();
</script>
</body>
</html>
@model dynamic
@Model.Name
@Html.TextBoxFor(m => m.Username)
@Html.TextBox("Username")