1
두 개의 확인란이 있습니다. 내가 클릭 한 확인란을 캡처하고 서비스를 다시 보내려면, 나는 fnt 끝에서 클릭 한 확인란을 캡처 할 수 있지만 REST (VB.Net)에서 캡처하는 방법을 모르겠습니다. VB.NET에서 JSON 캡처 REST
<form>
<input type="checkbox" class = "checkBoxProp" id = "1" name="checkBoxProp" value="1">Graph1<br>
<input type="checkbox" class = "checkBoxProp" id = "2" name="checkBoxProp" value="2">Graph4<br>
<input id="btnGetResponse" type="button" value="ClickMe!"/>
</form>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
$("#btnGetResponse").click(function()
{
var ids = $('.checkBoxProp:checked').map(function() {
return this.value;
}).get();
console.log(JSON.stringify(ids.join()));
$.ajax({
type: "POST",
url: "http://localhost:51349/SMS_Rest.svc/v1/usercheckboxes",
data: {ids: ids} ,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(response)
{
alert('success');
},
failure: function(response)
{
alert('fail');
}
});
});
그래서 REST에서 JSON을 캡처하는 방법 :
아래는 프론트 엔드 파일입니다.
Public Function CheckBoxDetails(ByVal requestData As **WHAT TO WRITE HERE**) As String Implements iSMS_Rest.CheckBoxDetails
// SOME LOGIC
End Function