在单击某些按钮时,我使用 Ajax 模型弹出以下代码:
if (SurveyCount == 1)
{
DateTime FreeSurveyDate = (DateTime)dtCountClientSurvey.Rows[0]["SurveyDate"];
if ((DateTime.Now - FreeSurveyDate).Days > 90)
{
Session["YourAssessment"] = false;
Session["MyAssessment"] = false;
modelPopUp.Visible = true;
ModalPopupExtender1.Show();
}
else
{
Response.Redirect("~/yourAssessment.aspx");
Session["YourAssessment"] = true;
Session["MyAssessment"] = false;
}
}
我面临的问题是,在else
某种程度上,它不是重定向到yourAssessment.aspx
而是回发到同一页面。
然后,当我在那里添加一个断点时,它会移动到该else
部分并停止调试并抱怨以下内容:
Locating source for 'C:\Users\Stephen\Documents\Repos\Superexpert\AjaxControlToolkit\Server\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs'. (No checksum.)
The file 'C:\Users\Stephen\Documents\Repos\Superexpert\AjaxControlToolkit\Server\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs' does not exist.
Looking in script documents for 'C:\Users\Stephen\Documents\Repos\Superexpert\AjaxControlToolkit\Server\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs'...
Looking in the projects for 'C:\Users\Stephen\Documents\Repos\Superexpert\AjaxControlToolkit\Server\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs'.
The file was not found in a project.
Looking in directory 'C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\vc7\atlmfc'...
Looking in directory 'C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\vc7\crt'...
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: C:\Users\Stephen\Documents\Repos\Superexpert\AjaxControlToolkit\Server\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs.
The debugger could not locate the source file 'C:\Users\Stephen\Documents\Repos\Superexpert\AjaxControlToolkit\Server\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs'.
已经有一段时间了,我仍然无法修复这个错误,我想知道它没有被重定向的原因是什么?