zoukankan      html  css  js  c++  java
  • GridView、DetailView、FormView和DropDownList级联更新和插入(不用FindControl)

     <asp:TemplateField HeaderText="类别" SortExpression="CategoryName">
            <EditItemTemplate>
            <asp:DropDownList ID="CategoryDDL2" runat="server" Width="180px" 
                      SelectedValue='<%# Bind("CategoryID") %>'
                      DataSourceID="CategoryDS" 
                      DataTextField="CategoryName" DataValueField="CategoryID"
    >
            </asp:DropDownList>                   
             </EditItemTemplate>
                   <InsertItemTemplate>
                       <asp:DropDownList ID="CategoryDDL3" runat="server" Width="180px" 
                               SelectedValue='<%# Bind("CategoryID") %>'     DataSourceID="CategoryDS" 
                               DataTextField="CategoryName" DataValueField="CategoryID">

                        </asp:DropDownList>
                   </InsertItemTemplate>
                   <ItemTemplate>
                       <asp:Label ID="Label1" runat="server" Text='<%# Bind("CategoryName") %>'>
                       </asp:Label>
                   </ItemTemplate>



              <UpdateParameters>
                    <asp:Parameter Name="LessonID" Type="Int32" />
                    <asp:Parameter Name="CategoryID" Type="Int32" />
                    <asp:Parameter Name="LessonName" Type="String" />
                </UpdateParameters>
                <InsertParameters>
                   <asp:Parameter Name="CategoryID" Type="Int32" />
                    <asp:Parameter Name="LessonName" Type="String" />
                 </InsertParameters>

  • 相关阅读:
    jQuery解析XML
    jQuery常用AJAX-API
    jQuery练习
    jQuery常用Event-API
    jQuery常用Method-API
    jQuery九类选择器
    js对象和jQuery对象的区别
    js对象和jQuery对象相互转换
    jQuery入门
    JSON
  • 原文地址:https://www.cnblogs.com/fjchenq/p/528064.html
Copyright © 2011-2022 走看看