|
<%@ Page Language="C#" AutoEventWireup="true" Codebehind="UseWithObjectDataSource.aspx.cs"
Inherits="TestWebApplication.UseWithObjectDataSource" MasterPageFile="~/Site1.Master"
Title="UseWithObjectDataSource" %>
<%@ Register TagPrefix="ddlb" Assembly="OptionDropDownList" Namespace="OptionDropDownList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
<div>
Choose food:
<ddlb:optiongroupselect id="ogsFinishedProduct" runat="server" appenddatabounditems="True"
autopostback="True" datatextfield="food" datavaluefield="id">
<ddlb:OptionGroupItem ID="OptionGroupItem1" runat="server" Value="-1" Text="-- Select --" Selected="True" />
</ddlb:optiongroupselect>
<br />
<br />
<asp:GridView ID="GridView1" runat="server" DataSourceID="ObjectDataSource1" />
</div>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OldValuesParameterFormatString="original_{0}"
SelectMethod="GetByFinishedProduct" TypeName="TestWebApplication.DataClassForObjectDataSource">
<SelectParameters>
<asp:ControlParameter ControlID="ogsFinishedProduct" Name="id" PropertyName="SelectedValue"
Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
</asp:Content>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.