0
私は次のように私は簡単なログインビューを持っているjQueryのモバイルおよびASP.NET MVC 3を使用したモバイルサイトを開発しようとしています:jQueryのモバイルASP.NET MVC3エラー
以下<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>@ViewBag.Title</title>
<link href="@Links.Content.Site_css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.css" />
<script src="@Links.Scripts.jquery_1_5_1_min_js" type="text/javascript"></script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.js"></script>
</head>
<body>
<div data-role="page">
<div data-role="header">
<h1>Login</h1>
</div>
<div data-role="content">
@using (Html.BeginForm())
{
<div data-role="fieldcontain">
<label for="username">Username:</label>
<input type="text" name="username" id="username" value="" />
</div>
<div data-role="fieldcontain">
<label for="password">Password:</label>
<input type="password" name="password" id="password" value="" />
</div>
<div data-role="fieldcontain">
<fieldset data-role="controlgroup">
<legend></legend>
<input type="checkbox" name="rememberMe" id="rememberMe" class="custom" />
<label for="rememberMe">Remember Me</label>
</fieldset>
</div>
<input type="submit" value="Login" data-theme="e" />
}
</div>
<div data-role="footer">
</div>
</div>
</body>
</html>
は私のコードですコントローラ:
public partial class AccountController : Controller
{
[HttpGet]
public virtual ActionResult Login()
{
return View();
}
[HttpPost]
public virtual ActionResult Login(string username, string password)
{
return MVC.Admin.Home.Index();
}
}
ログインボタンをクリックすると、ユーザーをホーム画面にリダイレクトしたいだけです。しかし、いくつかの理由のために私は次のエラーを取得する:
のMicrosoft JScriptのランタイムエラー:プロパティ「_trigger」の値を取得できません:オブジェクトがnullまたは未定義である 行番号2371:to.data(「ページ」)。 _trigger( "beforeshow"、null、{prevPage:from || $( "")});
誰でもこの問題を解決できますか?
あなたのページにタグ[data-role="page"]
とdiv要素が含まれている必要があり