<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>

相关文章:

  • 2022-12-23
  • 2021-09-15
  • 2022-02-25
  • 2021-10-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-01
  • 2022-12-23
  • 2021-11-30
  • 2022-01-26
  • 2021-06-23
相关资源
相似解决方案