adb forward tcp:8080 tcp:8080
each of this tcp:8080 is your server port and client port number.
function f_MultiDelete()
{
if ($(".chList").size() > 0) {
var IDS = [];
$(".chList").each(function (i) {
if ($(this).attr('checked') == "checked" && $(this).attr('name') == "checkDelete") {
var ID = $(this).attr("vl");
IDS.push(ID);
}
});
if (IDS.length > 0) {
$.ajax({
type: "POST",url: Path, traditional:true, dataType:"json",
data: { 'IDList': IDS },
success: function (data) {
alert(data);
}
});
}
}
}
<input name="checkDelete" class="chList" vl="4" type="checkbox" />
<input name="checkDelete" class="chList" vl="3" type="checkbox" />
<input name="checkDelete" class="chList" vl="2" type="checkbox" />
<input name="checkDelete" class="chList" vl="5" type="checkbox" />
<div onclick="f_MultiDelete('/Admin/AGaleri/MultiDelete/')" class="btn btn-primary">Seçilileri Sil </div>
public ActionResult MultiDelete(IEnumerable<string> IDList)
{
//IDList parametresinden seçili ID lere ulaşabilirsiniz.
}
public class Service1 : System.Web.Services.WebService
{
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
[WebMethod]
public bool firstService(string name,string lastName)
{
// yazmak istediğimiz kodlar
} // webmethod fonksiyonlarımız istediğimiz kadar çoğaltabiliriz.
}
var service1 = new tryWebService.Service1SoapClient();
service1.firstService("parametre1", "parametre2");
// yazdığımız tüm methodlara service1 örneğinden ulaşabiliriz.