<%@ Page Language="VB" AutoEventWireup="false" CodeFile="EntityDataSource.aspx.vb" Inherits="EntityDataSource" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>ThaiCreate.Com Tutorial</title> </head> <body> <form id="form1" runat="server"> <div> <asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=mydatabaseEntities" DefaultContainerName="mydatabaseEntities" EnableDelete="True" EnableFlattening="False" EnableInsert="True" EnableUpdate="True" EntitySetName="customers"> </asp:EntityDataSource> <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="CustomerID" DataSourceID="EntityDataSource1"> <Columns> <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" ShowSelectButton="True" /> <asp:BoundField DataField="CustomerID" HeaderText="CustomerID" ReadOnly="True" SortExpression="CustomerID" /> <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" /> <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" /> <asp:BoundField DataField="CountryCode" HeaderText="CountryCode" SortExpression="CountryCode" /> <asp:BoundField DataField="Budget" HeaderText="Budget" SortExpression="Budget" /> <asp:BoundField DataField="Used" HeaderText="Used" SortExpression="Used" /> </Columns> </asp:GridView> </div> </form> </body> </html>
<asp:EntityDataSource AutoGenerateOrderByClause="True|False" AutoGenerateWhereClause="True|False" AutoPage="True|False" AutoSort="True|False" CommandText="string" ConnectionString="string" ContextType="typed ObjectContext" ContextTypeName="string" DefaultContainerName="string" EnableDelete="True|False" EnableInsert="True|False" EnableUpdate="True|False" EnableViewState="True|False" EntitySetName="string" EntityTypeFilter="string" GroupBy="string" Include="string" OnContextCreated="ContextCreated event handler" OnContextCreating="ContextCreating event handler" OnContextDisposing="ContextDisposing event handler" OnDataBinding="DataBinding event handler" OnDeleted="Deleted event handler" OnDeleting="Deleting event handler" OnException="IDynamicDataSource.Exception event handler" OnInserted="Inserted event handler" OnInserting="Inserting event handler" OnSelected="Selected event handler" OnSelecting="Selecting event handler" OnUpdated="Updated event handler" OnUpdating="Updating event handler" OrderBy="string" runat="server" Select="string" StoreOriginalValuesInViewState="True|False" Where="string" > <CommandParameters /> <DeleteParameters /> <GroupByParameters /> <InsertParameters /> <OrderByParameters /> <SelectParameters /> <UpdateParameters /> <WhereParameters /> </asp:EntityDataSource>
ช่วยกันสนับสนุนรักษาเว็บไซต์ความรู้แห่งนี้ไว้ด้วยการสนับสนุน Source Code 2.0 ของทีมงานไทยครีเอท