Hy!提交後顯示輸入文字
我想說明從輸入後開始提交
我的代碼頁的文本:
@{
ViewBag.Title = "Login";
}
@{
if (ViewData["uname"]!=null)
{
<div>
Username: @ViewData["uname"] //The Text from the input should be displayed here after submit
@Session["uname"] = @ViewData["uname"]
</div>
}
}
<h2>Login</h2>
<h4>Username:</h4>
<input type="text" name="uname" value="" /> //Input
<button />
當我按下按鈕沒有出現。來自輸入的文本應該顯示abouth。提交按鈕的標準類型。
你能解釋你到底在做什麼嗎?你想在哪裏顯示文字? –