{"id":2,"date":"2009-01-28T09:32:00","date_gmt":"1970-01-01T00:00:00","guid":{"rendered":"http:\/\/www.yazilimmutfagi.com\/?p=2"},"modified":"2009-01-28T09:32:00","modified_gmt":"1970-01-01T00:00:00","slug":"visual-studio-2005-de-ajax-net-e-giris-ve-timer-bileseninin-kullanimi","status":"publish","type":"post","link":"https:\/\/www.yazilimmutfagi.com\/index.php\/2009\/01\/28\/visual-studio-2005-de-ajax-net-e-giris-ve-timer-bileseninin-kullanimi\/","title":{"rendered":"Visual Studio 2005 de Ajax.NET e Giris ve Timer Bileseninin Kullanimi"},"content":{"rendered":"<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">Merhaba arkadaslar.<\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">Yeni baslayacak olan bu ilkyazi dizimizde konumuz ajax.net. Nasil ajax&rsquo;li siteler hazirlayabiliriz, ya da var olan sitelerimizi nasil ajax&rsquo;a &ccedil;evirebiliriz cevaplarini bulacagimiz sorular olacak bu yazi dizimizde.<\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><a href='www.yazilimmutfagi.com'>.<\/a><\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">Ilk makalemizin konusu: Visual Studio 2005 ide&rsquo;sinde, ASP.NET 2.0 &uuml;zerinde ajax ara y&uuml;zl&uuml; siteler hazirlayabilmemiz i&ccedil;in neler yapmaliyiz.<\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">Visual Studio 2005 ile ajax y&uuml;kl&uuml; olarak gelmiyor ne yazik ki.2008 de ise ajax default olarak y&uuml;kl&uuml; geliyor ve bizi biraz sonra yapmak zorunda kalacagimiz islerden kurtarmis oluyor. <\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">Ajax&rsquo;in sistemimizde &ccedil;alisabilmesi i&ccedil;in ilk olarak ajax extension 1.0&rsquo;in sisteme kurulmasi gerekmektedir. Bunun i&ccedil;in asagidaki adrese gidip ajax extension 1.0&rsquo;i bilgisayarimiza indirmemiz gerekli. <\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><a href=\"http:\/\/www.asp.net\/ajax\/downloads\/\"><span style=\"font-size: small; color: rgb(0, 0, 255); font-family: Calibri;\">http:\/\/www.asp.net\/ajax\/downloads\/<\/span><\/a><span style=\"font-size: small; font-family: Calibri;\"> <\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">Indirme islemi tamamlandiktan sonra dosyayi bilgisayarimiza kuruyoruz.<\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">Kurulum tamamlandiktan sonra Visual Studio 2005&rsquo;i &ccedil;alistiriyoruz. New web site se&ccedil;enegini tikladigimiz zaman asagidaki ekran g&ouml;r&uuml;nt&uuml;s&uuml;nden de g&ouml;rebilecegimiz gibi &ldquo;ASP.NET Ajax-Enabled Web Site&rdquo; se&ccedil;enegi web site se&ccedil;enekleri arasina eklenmis olur. Bu se&ccedil;enegi se&ccedil;ip yeni bir web site yaratiyoruz.<\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">Olusturdugumuz web sitesindeki default.aspx dosyasina baktigimizda sayfa &uuml;zerinde 1 tane &ldquo;script manager&rdquo; bulunmaktadir. Eger bir sayfada ajax kullanmak istiyorsak sayfa &uuml;zerinde mutlaka 1 tane script manager olmadir. Toolbox&rsquo;a baktiginiz zaman &ldquo;Ajax Extensions&rdquo; adinda yeni bir tab&rsquo;in eklendigini g&ouml;rebilirsiniz.<\/span><\/p>\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"1\" style=\"border: medium none ; border-collapse: collapse;\" class=\"MsoTableGrid\">\n    <tbody>\n        <tr style=\"\">\n            <td valign=\"top\" width=\"158\" style=\"border: 1pt solid black; padding: 0cm 5.4pt; width: 118.8pt; background-color: transparent;\">\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"\"><img decoding=\"async\" loading=\"lazy\" height=\"104\" width=\"145\" alt=\"\" src=\"http:\/\/www.yazilimmutfagi.com\/Makale\/Img\/SerkanIsel\/15_1_resim1.jpg\" \/><\/span><\/p>\n            <\/td>\n            <td valign=\"top\" width=\"456\" style=\"border-style: solid solid solid none; border-color: black black black rgb(240, 240, 240); border-width: 1pt 1pt 1pt medium; padding: 0cm 5.4pt; width: 341.8pt; background-color: transparent;\">\n            <p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt; line-height: 115%;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">Bu tabda yanda resimde g&ouml;rebileceginiz componentler mevcuttur. Bu componentleri ayrintilari ile ileriki makelelerimiz inceleyecegiz.<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">&nbsp;<\/span><\/p>\n            <\/td>\n        <\/tr>\n    <\/tbody>\n<\/table>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">Ajax&rsquo;in kullanabilecegimiz daha bir&ccedil;ok componenti mevcuttur.Bunlari y&uuml;klemek i&ccedil;inse yine ajax&rsquo;in kendi sitesinden &ldquo;ajax control toolkit-no source&rdquo;u <span style=\"\">&nbsp;<\/span>indiriyoruz. Eger isterseniz bu componentleri source kodlari ile de indirebilirsiniz. Sitemizde kullanabilmemiz ajaxcontroltoolkit.dll bize yeterli olacaktir.<\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">Indirdigimiz zip&rsquo;li dosyayi a&ccedil;ip &ldquo;SampleWebSite&rdquo; ismindeki klas&ouml;r&uuml;n i&ccedil;erisindeki bin klas&ouml;r&uuml;nde yer alan &ldquo;ajaxcontroltoolkit.dll&rdquo; dosyasini alip kendi projemizde referance olarak ekliyoruz.<\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\">&nbsp;<\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\"><img decoding=\"async\" loading=\"lazy\" height=\"602\" width=\"313\" alt=\"\" src=\"http:\/\/www.yazilimmutfagi.com\/Makale\/Img\/SerkanIsel\/15_1_resim2.jpg\" \/><\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">Componentleri toolbox&rsquo;a y&uuml;klemek i&ccedil;inse asagidaki resimde de g&ouml;r&uuml;lecegi gibi toolbox &uuml;zerinde sag tiklayip &ldquo;Add Tab&rdquo; diyoruz.<\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">&nbsp;<\/span><a href='www.yazilimmutfagi.com'>.<\/a><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\">&nbsp;<\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\"><img decoding=\"async\" loading=\"lazy\" height=\"292\" width=\"184\" alt=\"\" src=\"http:\/\/www.yazilimmutfagi.com\/Makale\/Img\/SerkanIsel\/15_1_resim3.jpg\" \/><\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">Tab&rsquo;a herhangi bir isim veriyoruz &ldquo;Ajax components&rdquo; gibi. Sonra tabimiz &uuml;zerinde sag tiklayip &ldquo;Choose Items&rdquo; diyoruz. <\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\">&nbsp;<\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\"><img decoding=\"async\" loading=\"lazy\" height=\"291\" width=\"195\" alt=\"\" src=\"http:\/\/www.yazilimmutfagi.com\/Makale\/Img\/SerkanIsel\/15_1_resim4.jpg\" \/><\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">A&ccedil;ilan pencerede browse diyip sitemiz i&ccedil;erisindeki &ldquo;Bin&rdquo; klas&ouml;r&uuml;ndeki &ldquo;ajaxcontroltoolkit.dll&rdquo; dosyasini se&ccedil;iyoruz. Se&ccedil;tikten sonra alt taraftaki pencerede ajax&rsquo;in componentleri se&ccedil;ili olarak gelir. Ok diyip pencereyi kapattigimiz anda componentlerin hepsi tabimizi i&ccedil;erisine y&uuml;klenmis olur.<\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">&nbsp;<\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\">&nbsp;<\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\"><img decoding=\"async\" loading=\"lazy\" height=\"775\" width=\"195\" alt=\"\" src=\"http:\/\/www.yazilimmutfagi.com\/Makale\/Img\/SerkanIsel\/15_1_resim5.jpg\" \/><\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">Artik ajax componentlerini sayfalarimizda afiyetle kullanabiliriz.<\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">Ileriki makalelerimizde bu componentlerin hepsini tek tek ayrintili olarak inceleyecegiz.<\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">Simdi gelelim AJAX Extensions i&ccedil;erisinde yer alan kontrollerin neler oldugunu, nerede ve nasil kullanildigina. <\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">&nbsp;<\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\">&nbsp;<\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\"><img decoding=\"async\" loading=\"lazy\" height=\"97\" width=\"135\" alt=\"\" src=\"http:\/\/www.yazilimmutfagi.com\/Makale\/Img\/SerkanIsel\/15_1_resim1.jpg\" \/><\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">Yukaridaki resimde g&ouml;r&uuml;ld&uuml;g&uuml; gibi AJAX Extensions tab&rsquo;inda su kontroller yer alir: Timer, ScriptManager, ScriptManagerProxy, UpdateProgress, UpdatePanel.<\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><strong style=\"\"><span style=\"font-size: small;\"><span style=\"font-family: Calibri;\">Sirasi ile Componentleri Inceleyelim.<\/span><\/span><\/strong><\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: small;\"><span style=\"font-family: Calibri;\"><strong style=\"\">Timer: <span style=\"\">&nbsp;<\/span><\/strong>Web sitelerini d&uuml;s&uuml;nd&uuml;g&uuml;m&uuml;z zaman mantik olarak request-response olarak &ccedil;alisir. Yani bir talep bir cevap seklinde bir yasam d&ouml;ng&uuml;s&uuml; vardir. Talep bir butonun tiklanmasi, dropdown&rsquo;un degerinin degistirilmesi, checkbox&rsquo;in tiklanmasi olabilir. Fakat bazi durumlarda bir talep beklemeden de bazi isler yapmamiz gerekebilir. &Ouml;rnegin 10 dk da bir griddeki verileri g&uuml;ncellemek. Iste bu gibi durumlarda timer kullanilir. Timer belirli zaman aralilarinda rutin olan bir isi yapabilecegimiz bir kontrold&uuml;r. Aslinda da burada da bir talep vardir. Fakat bu talep kullanicidan degil timer tarafindan olusturulur.<\/span><\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">&Ouml;rnek bir proje yaparak konuyu daha iyi anlayabiliriz. Visual Studio 2005&rsquo;i a&ccedil;alim ve yeni bir ajax-enabled web site projesi a&ccedil;alim.<\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\">&nbsp;<a href='www.yazilimmutfagi.com'>.<\/a><\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\"><img decoding=\"async\" loading=\"lazy\" height=\"405\" width=\"608\" alt=\"\" src=\"http:\/\/www.yazilimmutfagi.com\/Makale\/Img\/SerkanIsel\/15_1_resim7.jpg\" \/><\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">Default.aspx sayfasina &ouml;ncelikle bir tane updatepanel ekliyoruz. Update Panel i&ccedil;erisine de bir tane timer bir tane de label kontrol&uuml; ekliyoruz.<\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\">&nbsp;<\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\"><img decoding=\"async\" loading=\"lazy\" height=\"280\" width=\"321\" alt=\"\" src=\"http:\/\/www.yazilimmutfagi.com\/Makale\/Img\/SerkanIsel\/15_1_resim8.jpg\" \/><\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">Timer&rsquo;in talebi hangi araliklarla olusturacagini &ldquo;interval&rdquo; &ouml;zelligi belirler. Deger olarak milisaniye cinsinden degerler alir. Interval &ouml;zelligi 10000 olursa 10 sn demektir. Biz de interval &ouml;zelligini 1000 yapiyoruz. Bu durumda timer 1 sn de bir &ccedil;alisacak. Peki, 1 sn de bir &ccedil;alisacak da ne yapacak. Timer&rsquo;in zaman araliklarinin sonunda &ldquo;Tick&rdquo; event&rsquo;i ger&ccedil;eklesir. Biz de kodlarimizi burada yazacagiz.<\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: 'Courier New';\">&lt;<\/span><span style=\"font-size: 10pt; color: rgb(163, 21, 21); font-family: 'Courier New';\">asp<\/span><span style=\"font-size: 10pt; color: blue; font-family: 'Courier New';\">:<\/span><span style=\"font-size: 10pt; color: rgb(163, 21, 21); font-family: 'Courier New';\">ScriptManager<\/span><span style=\"font-size: 10pt; font-family: 'Courier New';\"> <span style=\"color: red;\">ID<\/span><span style=\"color: blue;\">=&quot;ScriptManager1&quot;<\/span> <span style=\"color: red;\">runat<\/span><span style=\"color: blue;\">=&quot;server&quot;&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: 'Courier New';\">&lt;\/<\/span><span style=\"font-size: 10pt; color: rgb(163, 21, 21); font-family: 'Courier New';\">asp<\/span><span style=\"font-size: 10pt; color: blue; font-family: 'Courier New';\">:<\/span><span style=\"font-size: 10pt; color: rgb(163, 21, 21); font-family: 'Courier New';\">ScriptManager<\/span><span style=\"font-size: 10pt; color: blue; font-family: 'Courier New';\">&gt;<\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: 'Courier New';\">&lt;<\/span><span style=\"font-size: 10pt; color: rgb(163, 21, 21); font-family: 'Courier New';\">asp<\/span><span style=\"font-size: 10pt; color: blue; font-family: 'Courier New';\">:<\/span><span style=\"font-size: 10pt; color: rgb(163, 21, 21); font-family: 'Courier New';\">UpdatePanel<\/span><span style=\"font-size: 10pt; font-family: 'Courier New';\"> <span style=\"color: red;\">ID<\/span><span style=\"color: blue;\">=&quot;UpdatePanel2&quot;<\/span> <span style=\"color: red;\">runat<\/span><span style=\"color: blue;\">=&quot;server&quot;&gt;<\/span><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: 'Courier New';\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: rgb(163, 21, 21);\">ContentTemplate<\/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: 'Courier New';\"><span style=\"\">&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);\">UpdatePanel<\/span> <span style=\"color: red;\">ID<\/span><span style=\"color: blue;\">=&quot;UpdatePanel3&quot;<\/span> <span style=\"color: red;\">runat<\/span><span style=\"color: blue;\">=&quot;server&quot;&gt;<\/span><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: 'Courier New';\"><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);\">ContentTemplate<\/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: 'Courier New';\"><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);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">UpdatePanel<\/span> <span style=\"color: red;\">ID<\/span><span style=\"color: blue;\">=&quot;UpdatePanel4&quot;<\/span> <span style=\"color: red;\">runat<\/span><span style=\"color: blue;\">=&quot;server&quot;&gt;<\/span><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: 'Courier New';\"><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);\">ContentTemplate<\/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: 'Courier New';\"><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: blue;\">&lt;<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">Timer<\/span> <span style=\"color: red;\">ID<\/span><span style=\"color: blue;\">=&quot;Timer1&quot;<\/span> <span style=\"color: red;\">runat<\/span><span style=\"color: blue;\">=&quot;server&quot;<\/span> <span style=\"color: red;\">Interval<\/span><span style=\"color: blue;\">=&quot;1000&quot;<\/span> <span style=\"color: red;\">OnTick<\/span><span style=\"color: blue;\">=&quot;Timer1_Tick&quot;&gt;<\/span><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: 'Courier New';\"><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: blue;\">&lt;\/<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">Timer<\/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: 'Courier New';\"><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: 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;\">Text<\/span><span style=\"color: blue;\">=&quot;1&quot;<\/span> <span style=\"color: red;\">runat<\/span><span style=\"color: blue;\">=&quot;server&quot;<\/span> <span style=\"color: blue;\">&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: 'Courier New';\"><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);\">ContentTemplate<\/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: 'Courier New';\"><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);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">UpdatePanel<\/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: 'Courier New';\"><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);\">ContentTemplate<\/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: 'Courier New';\"><span style=\"\">&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);\">UpdatePanel<\/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: 'Courier New';\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;\/<\/span><span style=\"color: rgb(163, 21, 21);\">ContentTemplate<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; line-height: 115%; font-family: 'Courier New';\">&lt;\/<\/span><span style=\"font-size: 10pt; color: rgb(163, 21, 21); line-height: 115%; font-family: 'Courier New';\">asp<\/span><span style=\"font-size: 10pt; color: blue; line-height: 115%; font-family: 'Courier New';\">:<\/span><span style=\"font-size: 10pt; color: rgb(163, 21, 21); line-height: 115%; font-family: 'Courier New';\">UpdatePanel<\/span><span style=\"font-size: 10pt; color: blue; line-height: 115%; font-family: 'Courier New';\">&gt;<\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">Labelin Textini 1 yapmayi unutmayin.<\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: small;\"><span style=\"font-family: Calibri;\"><span style=\"\">&nbsp;<\/span>Timer&rsquo;in tick event&rsquo;inda da asagidaki kodu yaziyoruz.<\/span><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: 'Courier New';\">protected<\/span><span style=\"font-size: 10pt; font-family: 'Courier New';\"> <span style=\"color: blue;\">void<\/span> Timer1_Tick(<span style=\"color: blue;\">object<\/span> sender, <span style=\"color: rgb(43, 145, 175);\">EventArgs<\/span> e)<\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: 'Courier New';\">{<\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: 'Courier New';\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span>Label1.Text = <span style=\"color: rgb(43, 145, 175);\">Convert<\/span>.ToString(<span style=\"color: blue;\">int<\/span>.Parse(Label1.Text) + 1);<\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: 'Courier New';\">}<\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">Hepsi bu kadar. Programi &ccedil;alistiriyoruz. Programimizda da g&ouml;rd&uuml;g&uuml;m&uuml;z gibi biz hi&ccedil;bir sey yapmadan label&rsquo;in texti s&uuml;rekli artiyor.<\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">B&ouml;ylelikle makalemizin sonuna gelmis bulunuyoruz. Bir sonraki makalede g&ouml;r&uuml;smek dilegi ile herkese iyi &ccedil;alismalar, g&uuml;zel &ccedil;alisma ortamlari diliyorum.<\/span><\/p>","protected":false},"excerpt":{"rendered":"<p>Sitelerimizi Ajax Kullanarak nasil hazirlariz, ya da var olan sitelerimizi nasil ajax\u2019a &#231;evirebiliriz. Ayrica Ajax.NET ile gelen Timer Bileseninin Kullanimi&#8230;<\/p>\n","protected":false},"author":527,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[409],"tags":[4224,4225,5818,5994,4992,5291,4964],"_links":{"self":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/posts\/2"}],"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\/527"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/comments?post=2"}],"version-history":[{"count":0,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/posts\/2\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/media?parent=2"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/categories?post=2"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/tags?post=2"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}