<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> <!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:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete" InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="myCustomerTableAdapters.customerTableAdapter" UpdateMethod="Update"> <DeleteParameters> <asp:Parameter Name="Original_CustomerID" Type="String" /> </DeleteParameters> <UpdateParameters> <asp:Parameter Name="Name" Type="String" /> <asp:Parameter Name="Email" Type="String" /> <asp:Parameter Name="CountryCode" Type="String" /> <asp:Parameter Name="Budget" Type="Decimal" /> <asp:Parameter Name="Used" Type="Decimal" /> <asp:Parameter Name="Original_CustomerID" Type="String" /> </UpdateParameters> <InsertParameters> <asp:Parameter Name="CustomerID" Type="String" /> <asp:Parameter Name="Name" Type="String" /> <asp:Parameter Name="Email" Type="String" /> <asp:Parameter Name="CountryCode" Type="String" /> <asp:Parameter Name="Budget" Type="Decimal" /> <asp:Parameter Name="Used" Type="Decimal" /> </InsertParameters> </asp:ObjectDataSource> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="CustomerID" DataSourceID="ObjectDataSource1"> <Columns> <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:ObjectDataSource CacheDuration="string|Infinite" CacheExpirationPolicy="Absolute|Sliding" CacheKeyDependency="string" ConflictDetection="OverwriteChanges|CompareAllValues" ConvertNullToDBNull="True|False" DataObjectTypeName="string" DeleteMethod="string" EnableCaching="True|False" EnablePaging="True|False" EnableTheming="True|False" EnableViewState="True|False" FilterExpression="string" ID="string" InsertMethod="string" MaximumRowsParameterName="string" OldValuesParameterFormatString="string" OnDataBinding="DataBinding event handler" OnDeleted="Deleted event handler" OnDeleting="Deleting event handler" OnDisposed="Disposed event handler" OnFiltering="Filtering event handler" OnInit="Init event handler" OnInserted="Inserted event handler" OnInserting="Inserting event handler" OnLoad="Load event handler" OnObjectCreated="ObjectCreated event handler" OnObjectCreating="ObjectCreating event handler" OnObjectDisposing="ObjectDisposing event handler" OnPreRender="PreRender event handler" OnSelected="Selected event handler" OnSelecting="Selecting event handler" OnUnload="Unload event handler" OnUpdated="Updated event handler" OnUpdating="Updating event handler" runat="server" SelectCountMethod="string" SelectMethod="string" SkinID="string" SortParameterName="string" SqlCacheDependency="string" StartRowIndexParameterName="string" TypeName="string" UpdateMethod="string" Visible="True|False" > <DeleteParameters> <asp:ControlParameter ControlID="string" ConvertEmptyStringToNull="True|False" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" Name="string" PropertyName="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> <asp:CookieParameter ConvertEmptyStringToNull="True|False" CookieName="string" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" Name="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> <asp:FormParameter ConvertEmptyStringToNull="True|False" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" FormField="string" Name="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> <asp:Parameter ConvertEmptyStringToNull="True|False" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" Name="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> <asp:ProfileParameter ConvertEmptyStringToNull="True|False" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" Name="string" PropertyName="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> <asp:QueryStringParameter ConvertEmptyStringToNull="True|False" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" Name="string" QueryStringField="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> <asp:SessionParameter ConvertEmptyStringToNull="True|False" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" Name="string" SessionField="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> </DeleteParameters> <FilterParameters> <asp:ControlParameter ControlID="string" ConvertEmptyStringToNull="True|False" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" Name="string" PropertyName="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> <asp:CookieParameter ConvertEmptyStringToNull="True|False" CookieName="string" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" Name="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> <asp:FormParameter ConvertEmptyStringToNull="True|False" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" FormField="string" Name="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> <asp:Parameter ConvertEmptyStringToNull="True|False" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" Name="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> <asp:ProfileParameter ConvertEmptyStringToNull="True|False" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" Name="string" PropertyName="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> <asp:QueryStringParameter ConvertEmptyStringToNull="True|False" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" Name="string" QueryStringField="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> <asp:SessionParameter ConvertEmptyStringToNull="True|False" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" Name="string" SessionField="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> </FilterParameters> <InsertParameters> <asp:ControlParameter ControlID="string" ConvertEmptyStringToNull="True|False" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" Name="string" PropertyName="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> <asp:CookieParameter ConvertEmptyStringToNull="True|False" CookieName="string" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" Name="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> <asp:FormParameter ConvertEmptyStringToNull="True|False" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" FormField="string" Name="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> <asp:Parameter ConvertEmptyStringToNull="True|False" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" Name="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> <asp:ProfileParameter ConvertEmptyStringToNull="True|False" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" Name="string" PropertyName="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> <asp:QueryStringParameter ConvertEmptyStringToNull="True|False" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" Name="string" QueryStringField="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> <asp:SessionParameter ConvertEmptyStringToNull="True|False" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" Name="string" SessionField="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> </InsertParameters> <SelectParameters> <asp:ControlParameter ControlID="string" ConvertEmptyStringToNull="True|False" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" Name="string" PropertyName="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> <asp:CookieParameter ConvertEmptyStringToNull="True|False" CookieName="string" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" Name="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> <asp:FormParameter ConvertEmptyStringToNull="True|False" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" FormField="string" Name="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> <asp:Parameter ConvertEmptyStringToNull="True|False" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" Name="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> <asp:ProfileParameter ConvertEmptyStringToNull="True|False" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" Name="string" PropertyName="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> <asp:QueryStringParameter ConvertEmptyStringToNull="True|False" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" Name="string" QueryStringField="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> <asp:SessionParameter ConvertEmptyStringToNull="True|False" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" Name="string" SessionField="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> </SelectParameters> <UpdateParameters> <asp:ControlParameter ControlID="string" ConvertEmptyStringToNull="True|False" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" Name="string" PropertyName="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> <asp:CookieParameter ConvertEmptyStringToNull="True|False" CookieName="string" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" Name="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> <asp:FormParameter ConvertEmptyStringToNull="True|False" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" FormField="string" Name="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> <asp:Parameter ConvertEmptyStringToNull="True|False" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" Name="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> <asp:ProfileParameter ConvertEmptyStringToNull="True|False" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" Name="string" PropertyName="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> <asp:QueryStringParameter ConvertEmptyStringToNull="True|False" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" Name="string" QueryStringField="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> <asp:SessionParameter ConvertEmptyStringToNull="True|False" DefaultValue="string" Direction="Input|Output|InputOutput|ReturnValue" Name="string" SessionField="string" Size="integer" Type="Empty|Object|DBNull|Boolean|Char|SByte| Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64| Single|Double|Decimal|DateTime|String" /> </UpdateParameters> </asp:ObjectDataSource>
ช่วยกันสนับสนุนรักษาเว็บไซต์ความรู้แห่งนี้ไว้ด้วยการสนับสนุน Source Code 2.0 ของทีมงานไทยครีเอท