0
我的MVC应用程序出现问题。 我有一个登录视图MVC ActionLink问题
<% Html.EnableClientValidation(); %>
<% using (Html.BeginForm())
{%>
<%: Html.ValidationSummary(true)%>
<fieldset>
<legend>Login</legend>
<div class="editor-label">
<%: Html.LabelFor(model => model.Username)%>
</div>
<div class="editor-field">
<%: Html.TextBoxFor(model => model.Username)%>
<%: Html.ValidationMessageFor(model => model.Username)%>
</div>
<div class="editor-label">
<%: Html.LabelFor(model => model.Password)%>
</div>
<div class="editor-field">
<%: Html.PasswordFor(model => model.Password)%>
<%: Html.ValidationMessageFor(model => model.Password)%>
</div>
<p>
<input type="submit" value="Login" />
</p>
</fieldset>
<%: Html.ActionLink("Set Email",
"SetEmail",
"GASLogin",
new {model = Model.Username},
null)%>
<% } %>
和一个ActionLink。当我单击动作链接时,我会发送一封电子邮件到文本框“<%:Html.TextBoxFor(model => model.Username)%>”的邮件地址。 问题是我的Model.Username为空。 那么我该如何做到这一点?
谢谢。