{"id":138,"date":"2009-05-12T15:15:00","date_gmt":"1970-01-01T00:00:00","guid":{"rendered":"http:\/\/www.yazilimmutfagi.com\/?p=138"},"modified":"2009-05-12T15:15:00","modified_gmt":"1970-01-01T00:00:00","slug":"datalist-kullanimi-veritabanindan-cekilen-kayitlari-matris-seklinde-gosterme","status":"publish","type":"post","link":"https:\/\/www.yazilimmutfagi.com\/index.php\/2009\/05\/12\/datalist-kullanimi-veritabanindan-cekilen-kayitlari-matris-seklinde-gosterme\/","title":{"rendered":"DataList Kullanimi, Veritabanindan \u00c7ekilen Kayitlari Matris Seklinde G\u00f6sterme"},"content":{"rendered":"<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;\">Bu makalemizde DataList kullanarak verileri nasil listeleyebilecegimizi &ouml;grenecegiz. Bildiginiz gibi gridview de listeleme isleminde her satir i&ccedil;in bir kayit gelir, DataList&rsquo;de ise bu &ouml;zeligi degistirebiliriz. Asagidaki resimde g&ouml;r&uuml;ld&uuml;g&uuml; gibi &uuml;r&uuml;nler yan yana &uuml;&ccedil;erli sekilde g&ouml;sterilmistir. Kayitlarimizi bu sekilde g&ouml;stermenin en kolay yolu DataList kullanmaktir. <\/span><\/p>\n<p align=\"center\" style=\"margin: 0cm 0cm 10pt; text-align: center;\" class=\"MsoNormal\">&nbsp;<\/p>\n<p class=\"MsoNormal\"><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;\"><img decoding=\"async\" loading=\"lazy\" height=\"209\" width=\"372\" alt=\"\" src=\"http:\/\/www.yazilimmutfagi.com\/Makale\/Img\/Sabri\/Datalist\/resim1.jpg\" style=\"float: left;\" \/><\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\">&nbsp;<\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\">&nbsp;<\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\">&nbsp;<\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\">&nbsp;<\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\">&nbsp;<\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\">&nbsp;<\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\">&nbsp;<\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\">&nbsp;<\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;\">Basit bir &ouml;rnekle Datalist kullanimini anlatalim. Ilk oalrak &uuml;r&uuml;nlerimizi kaydedecegimiz veritabanini olusturalim. &Ouml;rnegimizde kullanacagimiz veritabani yapisi asagidaki gibi olacaktir.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\">&nbsp;<\/p>\n<p><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;\">\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><img decoding=\"async\" loading=\"lazy\" height=\"201\" width=\"355\" alt=\"\" src=\"http:\/\/www.yazilimmutfagi.com\/Makale\/Img\/Sabri\/Datalist\/resim2.jpg\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\">&nbsp;<\/p>\n<\/span><\/p>\n<p><a href='www.yazilimmutfagi.com'>.<\/a><\/p>\n<p><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;\">Yukaridaki tablomuzu olusturduktan sonra tablomuza &ouml;rnek &uuml;r&uuml;n girisi yapalim. Biz toplam 6 &uuml;r&uuml;n giris yaptik. Resimlerle &ccedil;ok ugrasmamak i&ccedil;inde internete herhangi bir alisveris sitesindeki resimlerin url adreslerini tablomuzdaki ResimUrl kolonuna yazdik.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;\"><a href=\"http:\/\/www.yazilimmutfagi.com\/Makale\/Img\/Sabri\/Datalist\/WebSite1.rar\"><span style=\"color: rgb(0, 0, 255);\">&Ouml;rnek uygulamayi buradan indirebilirsiniz.<\/span><\/a><\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;\">Datalist kullanirken &uuml;r&uuml;nleri yan yana g&ouml;stermek i&ccedil;in <\/span><span style=\"font-size: 10pt; color: red; line-height: 115%; font-family: &quot;Courier New&quot;;\">RepeatDirection<\/span><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;\"> &ouml;zelligi vertical olmalidir. Yan yana ka&ccedil; kayit g&ouml;stermek istiyorsak <\/span><span style=\"font-size: 10pt; color: red; line-height: 115%; font-family: &quot;Courier New&quot;;\">RepeatColumns<\/span><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;\"> &ouml;zelligini kullanarak da bunu ayarlariz. Biz &ouml;rnegimizde yan yana 3 kayit g&ouml;stermek istedigimiz i&ccedil;in bu degerleri asagidaki gibi ayarladik.<\/span><span style=\"font-size: 10pt; color: red; line-height: 115%; font-family: &quot;Courier New&quot;;\"> <\/span><\/p>\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"1\" style=\"margin: auto auto auto 5.4pt; background: rgb(242, 242, 242) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; border-collapse: collapse;\" class=\"MsoTableGrid\">\n    <tbody>\n        <tr style=\"\">\n            <td valign=\"top\" width=\"558\" style=\"border: 1pt solid black; padding: 0cm 5.4pt; width: 418.2pt; background-color: transparent;\">\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: red; font-family: &quot;Courier New&quot;;\">RepeatDirection<\/span><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">=&quot;Vertical&quot;<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> <span style=\"color: red;\">RepeatColumns<\/span><span style=\"color: blue;\">=&quot;3&quot;<\/span><\/span><\/p>\n            <\/td>\n        <\/tr>\n    <\/tbody>\n<\/table>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;\">&nbsp;<\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;\">Datalist i&ccedil;in olusturdugumuz htms kodumuz asagidaki gibi oldu.<\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;\">&nbsp;<\/span><\/p>\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"1\" style=\"margin: auto auto auto 5.4pt; background: rgb(242, 242, 242) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; border-collapse: collapse;\" class=\"MsoTableGrid\">\n    <tbody>\n        <tr style=\"\">\n            <td valign=\"top\" width=\"558\" style=\"border: 1pt solid black; padding: 0cm 5.4pt; width: 418.2pt; background-color: transparent;\">\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">&lt;<\/span><span style=\"font-size: 10pt; color: rgb(163, 21, 21); font-family: &quot;Courier New&quot;;\">asp<\/span><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">:<\/span><span style=\"font-size: 10pt; color: rgb(163, 21, 21); font-family: &quot;Courier New&quot;;\">DataList<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> <span style=\"color: red;\">RepeatDirection<\/span><span style=\"color: blue;\">=&quot;Vertical&quot;<\/span> <span style=\"color: red;\">RepeatColumns<\/span><span style=\"color: blue;\">=&quot;3&quot;<\/span> <span style=\"color: red;\">ID<\/span><span style=\"color: blue;\">=&quot;UrunlerDataList&quot;<\/span> <span style=\"color: red;\">runat<\/span><span style=\"color: blue;\">=&quot;server&quot;<\/span> <span style=\"color: red;\">DataKeyField<\/span><span style=\"color: blue;\">=&quot;UrunId&quot;<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: red;\">OnItemCommand<\/span><span style=\"color: blue;\">=&quot;UrunlerDataList_ItemCommand&quot;<\/span> <span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: rgb(163, 21, 21);\">HeaderTemplate<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;\/<\/span><span style=\"color: rgb(163, 21, 21);\">HeaderTemplate<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: rgb(163, 21, 21);\">ItemTemplate<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: rgb(163, 21, 21);\">table<\/span> <span style=\"color: red;\">width<\/span><span style=\"color: blue;\">=&quot;200px&quot;&gt;<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: rgb(163, 21, 21);\">tr<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: rgb(163, 21, 21);\">td<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">ImageButton<\/span> <span style=\"color: red;\">CommandName<\/span><span style=\"color: blue;\">=&quot;DetayGoster&quot;<\/span> <span style=\"color: red;\">CommandArgument<\/span><span style=\"color: blue;\">=&#8217;<\/span><span style=\"background: yellow none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;\">&lt;%<\/span>#Bind(&quot;UrunId&quot;) <span style=\"background: yellow none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;\">%&gt;<\/span><span style=\"color: blue;\">&#8216;<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: red;\">ID<\/span><span style=\"color: blue;\">=&quot;urunresim&quot;<\/span> <span style=\"color: red;\">ImageUrl<\/span><span style=\"color: blue;\">=&#8217;<\/span><span style=\"background: yellow none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;\">&lt;%<\/span>#Bind(&quot;ResimUrl&quot;) <span style=\"background: yellow none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;\">%&gt;<\/span><span style=\"color: blue;\">&#8216;<\/span> <span style=\"color: red;\">runat<\/span><span style=\"color: blue;\">=&quot;server&quot;<\/span> <span style=\"color: blue;\">\/&gt;<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;\/<\/span><span style=\"color: rgb(163, 21, 21);\">td<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;\/<\/span><span style=\"color: rgb(163, 21, 21);\">tr<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbspnbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: rgb(163, 21, 21);\">tr<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: rgb(163, 21, 21);\">td<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">Label<\/span> <span style=\"color: red;\">ID<\/span><span style=\"color: blue;\">=&quot;Label1&quot;<\/span> <span style=\"color: red;\">runat<\/span><span style=\"color: blue;\">=&quot;server&quot;<\/span> <span style=\"color: red;\">Text<\/span><span style=\"color: blue;\">=&#8217;<\/span><span style=\"background: yellow none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;\">&lt;%<\/span>#Bind(&quot;UrunAdi&quot;) <span style=\"background: yellow none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;\">%&gt;<\/span><span style=\"color: blue;\">&#8216;&gt;&lt;\/<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">Label<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;\/<\/span><span style=\"color: rgb(163, 21, 21);\">td<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;\/<\/span><span style=\"color: rgb(163, 21, 21);\">tr<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;\/<\/span><span style=\"color: rgb(163, 21, 21);\">table<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;\/<\/span><span style=\"color: rgb(163, 21, 21);\">ItemTemplate<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: rgb(163, 21, 21);\">FooterTemplate<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;\/<\/span><span style=\"color: rgb(163, 21, 21);\">FooterTemplate<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">&lt;\/<\/span><span style=\"font-size: 10pt; color: rgb(163, 21, 21); font-family: &quot;Courier New&quot;;\">asp<\/span><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">:<\/span><span style=\"font-size: 10pt; color: rgb(163, 21, 21); font-family: &quot;Courier New&quot;;\">DataList<\/span><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">&gt;<\/span><\/p>\n            <\/td>\n        <\/tr>\n    <\/tbody>\n<\/table>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;\">&nbsp;<\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;\">&Uuml;r&uuml;ne ait resmi g&ouml;sterdigimiz ImageButton i&ccedil;in CommandName ve CommandArgument degerlerini setleyerek OnItemCommand eventi i&ccedil;ine asagidaki kodu yaziyoruz.<\/span><\/p>\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"1\" style=\"margin: auto auto auto 5.4pt; background: rgb(242, 242, 242) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; border-collapse: collapse;\" class=\"MsoTableGrid\">\n    <tbody>\n        <tr style=\"\">\n            <td valign=\"top\" width=\"558\" style=\"border: 1pt solid black; padding: 0cm 5.4pt; width: 418.2pt; background-color: transparent;\">\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">protected<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> <span style=\"color: blue;\">void<\/span> UrunlerDataList_ItemCommand(<span style=\"color: blue;\">object<\/span> source, <span style=\"color: rgb(43, 145, 175);\">DataListCommandEventArgs<\/span> e)<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">{<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">string<\/span> urunid = e.CommandArgument.ToString();<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">string<\/span> url = <span style=\"color: rgb(163, 21, 21);\">&quot;urundetay.aspx?urunid=&quot;<\/span> + urunid;<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span>Response.Write(<span style=\"color: rgb(163, 21, 21);\">&quot;&lt;script&gt;javascript:window.open(&#8216;&quot;<\/span> + url + <span style=\"color: rgb(163, 21, 21);\">&quot;&#8217;,&#8217;urun detay&#8217;,&#8217;menubar=1,resizable=1,width=350,height=250&#8242; )&lt;\/script&gt;&quot;<\/span>);<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">}<\/span><\/p>\n            <\/td>\n        <\/tr>\n    <\/tbody>\n<\/table>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;\">&nbsp;<\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;\">ImageButton tiklandigi zaman a&ccedil;ilacak popup&rsquo;a &uuml;r&uuml;n idsini bir querystring ile g&ouml;nderiyoruz, &uuml;r&uuml;n detay sayfasi da aldigi bu &uuml;r&uuml;n id ile &uuml;r&uuml;n&uuml;n detay bilgilerini alip g&ouml;steriyor. Bizim &ouml;rnegimizde detay bilgisi yok, siz kendi uygulamaniza g&ouml;re d&uuml;zenleme yapabilirsiniz. &Ouml;rnek i&ccedil;inde yazilan diger kodlari <a href=\"http:\/\/www.yazilimmutfagi.com\/Makale\/Img\/Sabri\/Datalist\/WebSite1.rar\"><span style=\"color: rgb(0, 0, 255);\">projeyi indirerek<\/span><\/a> inceleyebilirsiniz. <\/span><\/p>","protected":false},"excerpt":{"rendered":"<p>Bu makalemizde DataList kullanarak verileri nasil listeleyebilecegimizi &#246;grenecegiz. Bildiginiz gibi gridview de listeleme isleminde her satir i&#231;in bir kayit gelir, DataList\u2019de ise bu &#246;zeligi degistirebiliriz. Asagidaki resimde g&#246;r&#252;ld&#252;g&#252; gibi &#252;r&#252;nler yan yana &#252;&#231;erli sekilde g&#246;sterilmistir.<\/p>\n","protected":false},"author":517,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[407],"tags":[4330,4445,5673,5081,5187],"_links":{"self":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/posts\/138"}],"collection":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/users\/517"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/comments?post=138"}],"version-history":[{"count":0,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/posts\/138\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/media?parent=138"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/categories?post=138"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/tags?post=138"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}