利用ASP.NET Futures - Dynamic Data快速实现增删改,
关键代码:

 Default.aspx
Default.aspx <%@ Page Language="IronPython" %>
<%@ Page Language="IronPython" %>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <%--
<%--  The following methods can be implemented for DynamicData controls:
    The following methods can be implemented for DynamicData controls: 
     GetColumns()
    GetColumns() GetDetailsColumns()
    GetDetailsColumns() GetRSSFields()
    GetRSSFields() InitRow(row)
    InitRow(row) InitDataSource(dataSource)
    InitDataSource(dataSource) 
     --%>
--%> <script runat="server">
<script runat="server"> def GetColumns():
def GetColumns(): return [
    return [ "Category",
        "Category", "Title",
        "Title", "Complete"
        "Complete" ]
        ]
 from System.Drawing import Color
from System.Drawing import Color     def InitRow(row):
def InitRow(row): if "T" in Title:
    if "T" in Title: row.BackColor = Color.Wheat
        row.BackColor = Color.Wheat </script>
</script>
 <html xmlns="http://www.w3.org/1999/xhtml" >
<html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server">
<head runat="server"> <title>Untitled Page</title>
    <title>Untitled Page</title> <link href="../style.css" rel="stylesheet" type="text/css" />
    <link href="../style.css" rel="stylesheet" type="text/css" /> </head>
</head> <body>
<body> <asp:DynamicRssLink ID="DynamicRssLink1" runat="server" />
    <asp:DynamicRssLink ID="DynamicRssLink1" runat="server" /> <form id="form1" runat="server">
    <form id="form1" runat="server"> Category:
    Category: <asp:DropDownList ID="DropDownList1" runat="server" BackColor="yellow" Font-Bold="true">
        <asp:DropDownList ID="DropDownList1" runat="server" BackColor="yellow" Font-Bold="true"> </asp:DropDownList>
        </asp:DropDownList> <asp:DynamicFilter ID="DynamicFilter2" runat="server" ColumnName="Category" ControlID="DropDownList1" FilterStyle="DropDown" />
    <asp:DynamicFilter ID="DynamicFilter2" runat="server" ColumnName="Category" ControlID="DropDownList1" FilterStyle="DropDown" /> Complete:
    Complete: <asp:DynamicFilter ID="DynamicFilter1" ColumnName="Complete" runat="server" FilterStyle="DropDown" />
        <asp:DynamicFilter ID="DynamicFilter1" ColumnName="Complete" runat="server" FilterStyle="DropDown" /> <br /><br />
    <br /><br /> <table border="0" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%">
        <table border="0" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%"> <tr>
            <tr> <td align="left" valign="top"><asp:DynamicList ID="DynamicList1" runat="server" /><br /><br />
                <td align="left" valign="top"><asp:DynamicList ID="DynamicList1" runat="server" /><br /><br /> Add a task:
                Add a task: <asp:DynamicInsert ID="DynamicInsert1" runat="server" />
                <asp:DynamicInsert ID="DynamicInsert1" runat="server" /> </td>
                </td> <td align="right" valign="top">Details:<asp:DynamicDetails ID="DynamicDetails1" runat="server" />
                <td align="right" valign="top">Details:<asp:DynamicDetails ID="DynamicDetails1" runat="server" /> </td>
                </td> </tr>
            </tr> </table>
        </table> </form>
    </form> </body>
</body> </html>
</html>
 
                     
                    
                 
                    
                
 
 
         
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号