//web formun'un arka planı
//MicrosoftAjax.js ve template.js dosyalarını internetten temin edebilirsiniz.
//bu örnekte html nesneleri ile bir şablon oluşturup bu şablonlara veri bağlama
//işlemini göreceğiz.
//dikkat edilecek husus {{}} ibareleri bu ibareler içerisinde
//bağlanacak tablodaki alan ibareleri veya ajax 'a has fonksiyonları kullanımını sağlayan blok aralığı.
//jquery de bu yapı {= değişken/fonksiyon} şeklinde.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="tmpl_3.aspx.cs" Inherits="tmpl_3" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd - http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<html xmlns=" http://www.w3.org/1999/xhtml - http://www.w3.org/1999/xhtml "> <head runat="server"> <title></title>
<style type="text/css"> .sys-template { display: none; } </style>
<script src="Scripts/MicrosoftAjax.js" type="text/javascript"></script> <script src="Scripts/MicrosoftAjaxTemplates.js" type="text/javascript"></script>
<script type="text/javascript">
function pageLoad() { var _resimler = [ { url: 'img/aslan.png', valx: 'aslan' }, { url: 'img/esek.png', valx: 'esek' }, { url: 'img/fil.png', valx: 'fil' } ];
$create(Sys.UI.DataView, { data: _resimler }, null, null, $get('resimler')); }
</script>
</head> <body>
<table id="resimler" class="sys-template"> <tr> <td><img sys:src="{{url}}" /></td> <td>{{valx}}</td> </tr> </table>
</body> </html>
ve çıktı sonucu:
------------- http://www.kasatakip.com - Kasa Takip | http://www.caritakip.com - Cari Takip | http://www.evraktakip.com - Evrak Takip | http://www.etasqlmobil.com - ETA SQL Mobil
|