<configuration>
<appSettings>
<add key="webpages:Version" value="2.0.0.0"/>
<add key="webpages:Enabled" value="false"/>
<add key="PreserveLoginUrl" value="true"/>
<add key="ClientValidationEnabled" value="true"/>
<add key="UnobtrusiveJavaScriptEnabled" value="true"/>
<add key="map1" value="http://app.mapabc.com/apis?t=javascriptmap&v=3.1.1&key=b0a7db0b3a30f944a21c3682064dc70ef5b738b062f6479a5eca39725798b1ee300bd8d5de3a4ae3"/>
<!--获取通过webservice上传的文件路径-->
<add key="GetFilePath" value="http://192.168.10.149/TCUBE/WEBSERVICE/getFile?path="/>
<!--刷新待分配任务,配件申请的次数的时间 -->
<add key="CountTimeUpd" value="180000"/>
</appSettings>
使用这个时间
using System.Configuration;
public ActionResult Index()
{
ViewBag.Menus = PrintHtmlMenu();
ViewBag.username = GetSession().LoginName;
ViewBag.CountTimeUpd = ConfigurationManager.AppSettings["CountTimeUpd"]; //刷新待分配任务,配件申请的次数的时间
return View();
}
<script src="@Url.Content("~/Contents/Jquery.js")" type="text/javascript"></script>
<script type="text/javascript" language="javascript">
$(function () {
SetCount2();
var oHeight = $(window).height();
oHeight = oHeight-140;
$("#iframepage").height(oHeight);
})
function SetCount2(){
SetCount();
setTimeout(function () {
SetCount2();
}, @ViewBag.CountTimeUpd);
}
function SetCount(){
$.ajax({
type: 'post',
url: '@Url.Content("~/Home/GetCount")',
data:'json',
success: function (mes) {
$("#cTask").html("("+mes[0]+")");
$("#cApply").html("("+mes[1]+")");
},
error: function () {
Dialog.Alert('发送系统错误,请与系统管理员联系!');
},
beforeSend: function () {
},
complete: function () {
}
});
}
</script>