我想在“mailID”字段中发送空值,因为电子邮件ID不是表单中的必填字段。
var app = angular.module('MyApp', [])
app.controller('MyController', function($scope, $http, $window) {
$scope.ButtonClick = function() {
var post = $http({
method: "POST",
url: "url",
dataType: 'json',
data: {
name: $scope.Name,
mailID: $scope.MailID,
},
headers: {
"Content-Type": "application/json"
}
});
post.success(function(data, status) {
$window.alert(data.d);
});
post.error(function(data, status) {
$window.alert(data.Message);
});
}
});
答案 0 :(得分:0)
如果未设置create procedure get_some_stuffs
@max_records int = null
as
begin
set NOCOUNT on
IF @max_records IS NOT NULL
BEGIN
SET ROWCOUNT @max_records
END
select top (@max_records) *
from my_table
order by mothers_maiden_name
SET ROWCOUNT 0
end
,请不要将其发送到MailID
对象。
您的服务器需要检查data
是否可用。
MailID