Wednesday, December 24, 2008
ASP.NET Ajax : Templating
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="CSAstoria.index" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.sys-template
{
display: none;
}
</style>
<script type="text/javascript" language="javascript">
var ds;
var array;
function pageLoad() {
ds = new Sys.Data.AdoNetServiceProxy("Northwind.svc");
ds.query("Products", cbSuccess, cbFailure, null, null);
}
function cbSuccess(result, context, opertation) {
var dataView = new Sys.UI.DataView(document.getElementById("listTemplate"));
dataView.set_data(result);
dataView.updated()
}
function cbFailure(error, context, operation) {
}
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Scripts>
<asp:ScriptReference Path="~/MicrosoftAjaxAdoNet.js" />
<asp:ScriptReference Path="~/MicrosoftAjaxTemplates.js" />
</Scripts>
</asp:ScriptManager>
<div id="listTemplate" class="sys-template">
<ul>
<li>{{ ProductID }} - {{ ProductName }} </li>
</ul>
</div>
</form>
</body>
</html>
ADO Data Services : Service Operations and Interceptors
ADO Data Services (aka Astoria) is a very powerful framework, which enables to expose easyly data and methods on the web.
Here is a document which illustrate how to create new methods or intercept calling methods.
http://msdn.microsoft.com/en-gb/library/cc668788.aspx
Here is a document which illustrate how to create new methods or intercept calling methods.
http://msdn.microsoft.com/en-gb/library/cc668788.aspx
Sunday, December 14, 2008
IronPython - SIlverLight
Here is the adapted version of ScottGu sample
The xaml code
from System.Windows import Application
from System.Windows.Controls import UserControl
class App:
root = None
def MyButton_Click(self,s,e):
App.root.MyButton.Content = "Pushed"
App.root.Message.Text = "MyButton has been pushed"
def __init__(self):
App.root = Application.Current.LoadRootVisual(UserControl(), "app.xaml")
App.root.Message.Text = "Welcome to Python and Silverlight!"
App.root.MyButton.Content = "Push Me"
App.root.MyButton.Click += self.MyButton_Click
App()
The xaml code
<UserControl x:Class="System.Windows.Controls.UserControl"
xmlns="http://schemas.microsoft.com/client/2007"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid x:Name="layout_root" Background="White">
<TextBlock x:Name="Message" FontSize="55" />
<Button x:Name="MyButton" Content="Push Me" Width="100" Height="50" />
<Grid>
</UserControl>
Silverlight 2 and app.xap
Found of Python, i was in search of running xap files from the filesytem without success
Until I read this post :
http://groups.google.co.il/group/ironpy/browse_thread/thread/b6459831ed03af57
"""
Srivatsn Narayanan
l'original | Signaler ce message | Rechercher les messages de cet auteur
I was running into the same issue but you can specifically ask Chiron to zip the app folder by doing:
Chiron /d:app /z:app.xap. The /z switch adds the dlr assemblies as well. This xap runs from cassini.
"""
Thanks Srivatsn
Until I read this post :
http://groups.google.co.il/group/ironpy/browse_thread/thread/b6459831ed03af57
"""
Srivatsn Narayanan
l'original | Signaler ce message | Rechercher les messages de cet auteur
I was running into the same issue but you can specifically ask Chiron to zip the app folder by doing:
Chiron /d:app /z:app.xap. The /z switch adds the dlr assemblies as well. This xap runs from cassini.
"""
Thanks Srivatsn
Friday, December 12, 2008
How to add Dynamic Data to an Existing Web Site
Dynamic Data is a very nice feature for developping rapid administration interfaces.
Scott explains how to create a new on in an existing project
http://blogs.msdn.com/scothu/archive/2008/06/23/how-to-add-dynamic-data-to-an-existing-web-site.aspx
Another walkthrough from msdn :
http://msdn.microsoft.com/en-us/library/cc668188.aspx
Scott explains how to create a new on in an existing project
http://blogs.msdn.com/scothu/archive/2008/06/23/how-to-add-dynamic-data-to-an-existing-web-site.aspx
Another walkthrough from msdn :
http://msdn.microsoft.com/en-us/library/cc668188.aspx
Tuesday, December 2, 2008
LINQ To DataTable Extension Method
Sometimes needed :-)
Here is an extension method from DMAX
http://www.stormz.co.cc/2008/02/21/linq-to-datatable-extension-method/#respond
Here is an extension method from DMAX
http://www.stormz.co.cc/2008/02/21/linq-to-datatable-extension-method/#respond
Thursday, November 27, 2008
Subscribe to:
Posts (Atom)