📄 formview.aspx
字号:
<tr>
<td style="width: 59px">
ShippedDate:</td>
<td style="width: 9px">
<asp:TextBox ID="ShippedDateTextBox" runat="server" Text='<%# Bind("ShippedDate") %>'></asp:TextBox>
</td>
<td style="width: 54px">
ShipPostalCode:
</td>
<td style="width: 100px">
<asp:TextBox ID="ShipPostalCodeTextBox" runat="server" Text='<%# Bind("ShipPostalCode") %>'></asp:TextBox>
</td>
</tr>
<tr>
<td style="width: 59px">
ShipVia:</td>
<td style="width: 9px">
<asp:TextBox ID="ShipViaTextBox" runat="server" Text='<%# Bind("ShipVia") %>' Width="31px"></asp:TextBox>
</td>
<td style="width: 54px">
ShipCountry: </td>
<td style="width: 100px">
<asp:TextBox ID="ShipCountryTextBox" runat="server" Text='<%# Bind("ShipCountry") %>'></asp:TextBox>
</td>
</tr>
<tr>
<td style="width: 59px">
Freight:</td>
<td style="width: 9px">
<asp:TextBox ID="FreightTextBox" runat="server" Text='<%# Bind("Freight") %>' Width="85px"></asp:TextBox>
</td>
<td style="width: 54px">
<asp:Button ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert"
Text="Insert" Width="68px">
</asp:Button></td>
<td style="width: 100px">
<asp:Button ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
Text="Cancel" Width="74px">
</asp:Button>
</td>
</tr>
</table>
</InsertItemTemplate>
<PagerStyle Font-Names="Arial" Font-Size="11pt" Font-Bold="True"></PagerStyle>
<EditRowStyle Font-Names="Verdana" Font-Size="10pt"></EditRowStyle>
<ItemTemplate>
<table border="0">
<tr>
<td style="width: 100px; height: 18px">
OrderID:</td>
<td style="width: 173px; height: 18px">
<asp:Label ID="OrderIDLabel" runat="server" Text='<%# Eval("OrderID") %>'></asp:Label></td>
<td style="width: 100px; height: 18px">
ShipName:</td>
<td style="width: 297px; height: 18px">
<asp:Label ID="ShipNameLabel" runat="server" Text='<%# Bind("ShipName") %>'></asp:Label></td>
</tr>
<tr>
<td style="width: 100px">
CustomerID:</td>
<td style="width: 173px">
<asp:Label ID="CustomerIDLabel" runat="server" Text='<%# Bind("CustomerID") %>'></asp:Label></td>
<td style="width: 100px">
ShipAddress:</td>
<td style="width: 297px">
<asp:Label ID="ShipAddressLabel" runat="server" Text='<%# Bind("ShipAddress") %>'></asp:Label></td>
</tr>
<tr>
<td style="width: 100px">
EmployeeID:</td>
<td style="width: 173px">
<asp:Label ID="EmployeeIDLabel" runat="server" Text='<%# Bind("EmployeeID") %>'></asp:Label></td>
<td style="width: 100px">
ShipCity:</td>
<td style="width: 297px">
<asp:Label ID="ShipCityLabel" runat="server" Text='<%# Bind("ShipCity") %>'></asp:Label></td>
</tr>
<tr>
<td style="width: 100px">
OrderDate:</td>
<td style="width: 173px">
<asp:Label ID="OrderDateLabel" runat="server" Text='<%# Bind("OrderDate") %>'></asp:Label></td>
<td style="width: 100px">
ShipRegion:</td>
<td style="width: 297px">
<asp:Label ID="ShipRegionLabel" runat="server" Text='<%# Bind("ShipRegion") %>'></asp:Label></td>
</tr>
<tr>
<td style="width: 100px">
RequiredDate:</td>
<td style="width: 173px">
<asp:Label ID="RequiredDateLabel" runat="server" Text='<%# Bind("RequiredDate") %>'></asp:Label></td>
<td style="width: 100px">
ShipPostalCode:</td>
<td style="width: 297px">
<asp:Label ID="ShipPostalCodeLabel" runat="server" Text='<%# Bind("ShipPostalCode") %>'></asp:Label></td>
</tr>
<tr>
<td style="width: 100px">
ShippedDate:</td>
<td style="width: 173px">
<asp:Label ID="ShippedDateLabel" runat="server" Text='<%# Bind("ShippedDate") %>'></asp:Label></td>
<td style="width: 100px">
ShipCountry:</td>
<td style="width: 297px">
<asp:Label ID="ShipCountryLabel" runat="server" Text='<%# Bind("ShipCountry") %>'></asp:Label></td>
</tr>
<tr>
<td style="width: 100px">
ShipVia:</td>
<td style="width: 173px">
<asp:Label ID="ShipViaLabel" runat="server" Text='<%# Bind("ShipVia") %>'></asp:Label></td>
<td style="width: 100px">
</td>
<td style="width: 297px">
</td>
</tr>
<tr>
<td style="width: 100px">
Freight:</td>
<td style="width: 173px">
<asp:Label ID="FreightLabel" runat="server" Text='<%# Bind("Freight") %>'></asp:Label></td>
<td style="width: 100px">
</td>
<td style="width: 297px">
<asp:Button ID="EditButton" runat="server" CausesValidation="False" CommandName="Edit"
Text="Edit" Width="53px"></asp:Button> <asp:Button
ID="NewButton" runat="server" CausesValidation="False" CommandName="New" Text="New" Width="56px">
</asp:Button>
<asp:Button ID="DeleteButton" runat="server"
CausesValidation="False" CommandName="Delete" Text="Delete" Width="65px">
</asp:Button>
</td>
</tr>
</table>
</ItemTemplate>
</asp:FormView><asp:SqlDataSource ID="dsFormView" Runat="server" SelectCommand="SELECT [OrderID], [CustomerID], [EmployeeID], [OrderDate], [RequiredDate], [ShippedDate], [ShipVia], [Freight], [ShipName], [ShipAddress], [ShipCity], [ShipRegion], [ShipPostalCode], [ShipCountry] FROM [Orders] ORDER BY [OrderID] DESC"
ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>" DeleteCommand="DELETE FROM [Orders] WHERE [OrderID] = @original_OrderID" InsertCommand="INSERT INTO [Orders] ([CustomerID], [EmployeeID], [OrderDate], [RequiredDate], [ShippedDate], [ShipVia], [Freight], [ShipName], [ShipAddress], [ShipCity], [ShipRegion], [ShipPostalCode], [ShipCountry]) VALUES (@CustomerID, @EmployeeID, @OrderDate, @RequiredDate, @ShippedDate, @ShipVia, @Freight, @ShipName, @ShipAddress, @ShipCity, @ShipRegion, @ShipPostalCode, @ShipCountry)" UpdateCommand="UPDATE [Orders] SET [CustomerID] = @CustomerID, [EmployeeID] = @EmployeeID, [OrderDate] = @OrderDate, [RequiredDate] = @RequiredDate, [ShippedDate] = @ShippedDate, [ShipVia] = @ShipVia, [Freight] = @Freight, [ShipName] = @ShipName, [ShipAddress] = @ShipAddress, [ShipCity] = @ShipCity, [ShipRegion] = @ShipRegion, [ShipPostalCode] = @ShipPostalCode, [ShipCountry] = @ShipCountry WHERE [OrderID] = @original_OrderID">
<DeleteParameters>
<asp:Parameter Name="original_OrderID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="CustomerID" Type="String" />
<asp:Parameter Name="EmployeeID" Type="Int32" />
<asp:Parameter Name="OrderDate" Type="DateTime" />
<asp:Parameter Name="RequiredDate" Type="DateTime" />
<asp:Parameter Name="ShippedDate" Type="DateTime" DefaultValue="1/1/2099" />
<asp:Parameter Name="ShipVia" Type="Int32" DefaultValue="1" />
<asp:Parameter Name="Freight" Type="Decimal" />
<asp:Parameter Name="ShipName" Type="String" />
<asp:Parameter Name="ShipAddress" Type="String" />
<asp:Parameter Name="ShipCity" Type="String" />
<asp:Parameter Name="ShipRegion" Type="String" />
<asp:Parameter Name="ShipPostalCode" Type="String" />
<asp:Parameter Name="ShipCountry" Type="String" />
<asp:Parameter Name="original_OrderID" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="CustomerID" Type="String" />
<asp:Parameter Name="EmployeeID" Type="Int32" />
<asp:Parameter Name="OrderDate" Type="DateTime" />
<asp:Parameter Name="RequiredDate" Type="DateTime" />
<asp:Parameter Name="ShippedDate" Type="DateTime" />
<asp:Parameter Name="ShipVia" Type="Int32" />
<asp:Parameter Name="Freight" Type="Decimal" />
<asp:Parameter Name="ShipName" Type="String" />
<asp:Parameter Name="ShipAddress" Type="String" />
<asp:Parameter Name="ShipCity" Type="String" />
<asp:Parameter Name="ShipRegion" Type="String" />
<asp:Parameter Name="ShipPostalCode" Type="String" />
<asp:Parameter Name="ShipCountry" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -