<%@
Page Language="C#" MasterPageFile="~/DefaultMaster.master" AutoEventWireup="true" CodeFile="ModifParams.aspx.cs" Inherits="ModifParams" Title="Untitled Page" %>
<%@
Register Assembly="ExtendedObjectDataSource" Namespace="Manu.Web.UI.WebControls" TagPrefix="manu" %>
<asp:Content
ID="Content1" ContentPlaceHolderID="Content" Runat="Server">
<h1>Modifying
the parameters when using Custom Objects and the AffectedRows auto assignment</h1>
<asp:GridView
ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False"
AutoGenerateDeleteButton="True" AutoGenerateEditButton="True"
DataKeyNames="Id"
DataSourceID="ObjectDataSource1"
PageSize="4"
CssClass="gridview"
BackColor="#335789"
BorderColor="#133769"
BorderStyle="Solid"
BorderWidth="1px"
EmptyDataText="Sorry,
there are no products that matched your search criteria">
<Columns>
<asp:BoundField
DataField="Id"
HeaderText="Id"
ReadOnly="True"
SortExpression="Id" />
<asp:BoundField
DataField="Name"
HeaderText="Name"
SortExpression="Name" />
<asp:BoundField
DataField="Description"
HeaderText="Description"
SortExpression="Description" />
<asp:BoundField
DataField="Price"
HeaderText="Price"
SortExpression="Price" />
</Columns>
<RowStyle BackColor="White" ForeColor="#436799" />
<HeaderStyle ForeColor="White" />
<PagerStyle ForeColor="White" />
</asp:GridView>
<manu:ExtendedObjectDataSource
ID="ObjectDataSource1"
runat="server"
DataObjectTypeName="Product"
TotalRowCountParameterName="totalRowCount"
DeleteMethod="Delete" InsertMethod="AddWithOutput"
OldValuesParameterFormatString="old_{0}"
SelectMethod="LoadAll" TypeName="ProductsDAL" UpdateMethod="Edit"
OnDeleted="ObjectDataSource1_Deleted" OnInserted="ObjectDataSource1_Inserted"
OnSelected="ObjectDataSource1_Selected"
OnUpdated="ObjectDataSource1_Updated"
MaximumRowsParameterName="maxRows"
StartRowIndexParameterName="startIndex"
EnablePaging="true"
SortParameterName="sortedBy"
OnInserting="ObjectDataSource1_Inserting">
</manu:ExtendedObjectDataSource>
<br
/>
<asp:DetailsView ID="DetailsView1"
runat="server"
AutoGenerateRows="False"
DataKeyNames="Id"
DataSourceID="ObjectDataSource1"
DefaultMode="Insert"
Height="50px" Width="125px"
CssClass="htmltable">
<Fields>
<asp:BoundField
DataField="Name"
HeaderText="Name"
SortExpression="Name"
/>
<asp:BoundField
DataField="Description"
HeaderText="Description"
SortExpression="Description"
/>
<asp:BoundField
DataField="Price"
HeaderText="Price"
SortExpression="Price"
/>
<asp:CommandField
ShowInsertButton="True"
/>
</Fields>
<CommandRowStyle
ForeColor="White"
/>
</asp:DetailsView>
<asp:Label
ID="lbResult" runat="server" EnableViewState="False"></asp:Label>
</asp:Content>