我在服务器上部署我的应用程序时遇到问题...它显示错误 404 资源未找到,它在本地开发服务器上正常工作
html
<select class="select-box1" id="ddlStates" name="State">
<option value="0">--Select State --</option>
<option value="35">Alabama</option>
<option value="36">Alaska</option>
</select>
<button type="button" id="btnDevicesSearch" class="reset-btn">SEARCH</button>
脚本
$('#btnDevicesSearch').click(function () {
//debugger
//var formresult = $('#frmDeviceSearch').validationEngine('validate');
//if (!formresult) {
// return false;
//}
//else {
$.ajax({
url: '@(Url.Action("Search", "Devices"))',
async: false,
type: 'Post',
data: JSON.stringify({ SerialNo: $('#txtSearchSerialNo').val(), ItemName: $('#txtSearchItemName').val(), ItemType: $('#txtSearchItemType').val(), DeviceId: $('#txtSearchDeviceId').val(), To: $('#dtSearchTo').val(), From: $('#dtSearchFrom').val() }),
dataType: 'json',
contentType: 'application/json',
success: function (list) {
if (list !== null) {
alert(list.value)
}
},
});
window.location = "/Devices/DeviceList";
//}
});