0

我有一个网站(页面源包含在底部),第一次使用 Windows 8.1 / IE11 的用户访问它正确加载的页面,但是当他们点击按钮时它会永远旋转,如果他们刷新它工作正常,或者如果他们第一次访问该页面时打开 DevTools 也可以。此页面适用于除 Windows 8.1/IE11 之外的所有浏览器/操作系统组合,此外,Fiddler 也适用...

我没有 Console.log 语句。由于我无法打开 DevTools 并查看页面旋转等待,因此我不确定如何调试/修复此问题。

任何人以前见过这个,或者能够建议一种调试它的方法?尽管 Post/Get 在一段代码中都返回“View()”,但这是我排除分页错误的方法。据我所知,服务器没有被呼叫击中。浏览器只是旋转(我一次离开了 30 分钟)。

C#:

public ActionResult Introduction()
{
    if (Request.HttpMethod == "POST")
    {
        var user = DataRepository.GetUser(WebSecurity.CurrentUserName, TaskID);
        if (user.CurrentStep == 3)
        {
            user.CurrentStep++;
            DataRepository.SetUserStep(WebSecurity.CurrentUserId, user.CurrentStep);
        }
        return GetView(user);
    }

    Task task = DataRepository.GetTask(TaskID);
    return View(task);
}

我也试过:

[HttpGet]
public ActionResult Introduction()
{
    return View(task);
}

[HttpPost]
[ActionName("Introduction")]
public ActionResult IntroductionHttpPost()
{
    return View();
}

看法:

<!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8" />
        <title>Introduction</title>
        <script type="text/javascript">
            document.createElement('header');
            document.createElement('section');
            document.createElement('article');
            document.createElement('aside');
            document.createElement('nav');
            document.createElement('footer');
        </script>


    </head>
    <body>
        <div class="page clearfix">
            <header>
                <div id="progress" class="clearfix">

                </div>
                <div id="title">
                    <h1>Introduction</h1>
                                </div>
            </header>
            <section id="main">


    <form action="/Task/Introduction" method="post">Welcome,    <br />
        <br />
    In this survey you will be asked to answer some questions about yourself and about the kinds of events you enjoy. It is important that you consider each question and answer honestly, we can only accept surveys that are complete and personalized to your preferences.    <br />
        <br />
        <button type="submit" class="button">Start Task</button>
    </form>
            </section>
            <footer>
            </footer>
        </div>
    </body>
    </html>
4

1 回答 1

0

对于遇到此问题的其他人,您可以name为按钮添加属性,一切正常。

于 2013-11-05T10:37:36.103 回答