SELECTCommand="SELECT * FROM tbFirma WHERE KisiFK=ISNULL(@KisiFK,KisiFK)">
<SelectParameters>
<asp:Parameter Name="KisiFK" ConvertEmptyStringToNull="true" />
</SelectParameters>
</asp:SqlDataSource>
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.
public ActionResult Index()
{
ViewData["datas"] = ss();
return View();
}
List<string> dataList = new List<string>();
private List<string> ss()
{
string Site = "http://shiftdelete.net/";
WebClient client = new WebClient();
Stream data = client.OpenRead(Site);
StreamReader reader = new StreamReader(data, Encoding.GetEncoding("utf-8"));
string datas = reader.ReadToEnd();
string pattern3 = "<a.*?href=.*?>(.*?(<img.*?>).*?)</a>";
MatchCollection mathcollection = System.Text.RegularExpressions.Regex.Matches(datas, pattern3);
foreach (Match match in mathcollection)
{
if (match.Value.ToString().Contains("<img"))
dataList.Add(match.Value);
}
return dataList;
}