求解,asp.net页面第一行报错、、、
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DeviceCheckList.aspx.cs" Inherits="Web.NewAddProject.taskChooseManage.DeviceCheckList" %>
就这里报错少了个 ‘;’
页面有Js,和页面代码,如果我把Js和页面代码删了只保留第一行就是对的。。。不报这个错了。 求解!
如果我只删除页面代码,或者Js 还是会报错、、、、、、、、、、
Js代码:<script type="text/javascript">
function showNew() {
var taskid = '<%#Eval("devicechecktaskid")%>';
$.ajax({
type: "Get",
//contentType: "application/json",
url: "AjaxClassWay.aspx", //DataService.ashx/bindshow
dataType: "html",
cache: false,
data: { action: "showNewList", id: taskid },
success: function(objJson) {
$("#btn_div").empty().html(objJson);
},
error: function(e) {
$("#btn_div").empty().html("请求服务器出现错误");
}
})
}
function showOld() {
var taskid = '<%Eval("devicechecktaskid")%>';
$.ajax({
type: "Get",
//contentType: "application/json",
url: "AjaxClassWay.aspx", //DataService.ashx/bindshow
dataType: "html",
cache: false,
data: { action: "showOldList", id: taskid },
success: function(objJson) {
$("#oldanyway").empty().html(objJson);
},
error: function(e) {
$("#oldanyway").empty().html("请求服务器出现错误");
}
})
}
function allchoose() {
showNew();
showOld();
}
</script>
页面代码:
<form id="form1" runat="server">
<div>
基本信息:
<table>
<tr>
<td>任务编号:<asp:TextBox ID="id" runat="server"></asp:TextBox></td>
<td>生成时间:<asp:TextBox ID="taskdispatchtime" runat="server"></asp:TextBox></td>
<td>截止时间:<asp:TextBox ID="EndTime" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>作业类型:<asp:TextBox ID="checktype" runat="server"></asp:TextBox></td>
<td>任务来源:<asp:TextBox ID="sourceoftask" runat="server"></asp:TextBox></td>
<td>作业员:<asp:TextBox ID="userName" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>作业时间:<asp:TextBox ID="taskfintime" runat="server"></asp:TextBox></td>
<td>上次日检时间:<asp:TextBox ID="lastCheckDay" runat="server"></asp:TextBox></td>
<td>上次月检时间:<asp:TextBox ID="lastCheckMonth" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>上次年检时间:<asp:TextBox ID="lastCheckYear" runat="server"></asp:TextBox></td>
<td>设备名称:<asp:TextBox ID="vDevicedesc" runat="server"></asp:TextBox></td>
<td>设备标签:<asp:TextBox ID="devicesbarcode" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>建筑名称:<asp:TextBox ID="siteName" runat="server"></asp:TextBox></td>
<td>所在楼层:<asp:TextBox ID="floornum" runat="server"></asp:TextBox></td>
<td>设备位置:<asp:TextBox ID="location" runat="server"></asp:TextBox></td>
</tr>
</table>
<div>
本次作业数据
<tbody id="btn_div" >
</tbody>
以前作业数据
<tbody id="oldanyway" >
</tbody>
</div>
<div style="text-align:center; width:100%; margin-top:20px">
<asp:Button ID="btn_true" runat="server" Text="审核通过" style="margin-right:20px"
onclick="btn_true_Click" />
<asp:Button ID="btn_false" runat="server" Text="审核驳回"
onclick="btn_false_Click" />
</div>
</div>
</form>