问题描述
<%@ Page Language =C#AutoEventWireup =trueCodeFile =user.aspx.csInherits =user%>
<!DOCTYPE html>
< html xmlns =http://www.w3.org/1999/xhtml>
< head runat =server>
< title>< / title>
< / head>
< body>
< form id =form1runat =server>
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="user.aspx.cs" Inherits="user" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
< asp:SqlDataSource ID =dslistrunat =serverConnectionString =Data Source = DIPTO\SQLEXPRESS; Initial Catalog = registration; Persist Security Info = True;用户ID =循环顺序;密码= dipto012ProviderName =System.Data.SqlClientSelectCommand =SELECT * FROM [Transaction]>
< asp:ListView ID =ListView1runat =serverDataKeyNames =Account_no。 DataSourceID =dslistEnableModelValidation =TrueOnSelectedIndexChanged =ListView1_SelectedIndexChanged>
< alternatingitemtemplate>
< asp:Label ID =Account_no_Labelrunat = serverText ='<%#Eval(Account_no。)%>'/>
< asp:Label ID =DateLabelrunat =serverText ='< ;%#Eval(Date)%>'/>
< asp:Label ID =Dr_CrLabelrunat =serverText ='<%#Eval([ Dr / Cr])%>'/>
< asp:Label ID =Dr_Cr_AmmountLabelrunat =serverText ='<%#Eval([Dr / Cr] Ammount])%>'/>
< asp:标签ID =TotalLabelrunat =serverText ='<%#Eval(Total)%&g t;'/>
< edititemtemplate>
< asp:按钮ID =UpdateButtonrunat =serverCommandName =更新文字=更新/>
< asp:按钮ID =CancelButtonrunat =serverCommandName =取消文字=取消/>
< asp:TextBox ID =Account_no_TextBoxrunat =serverText ='<%#Bind(Account_no。)%>'/>
< asp:TextBox ID =DateTextBoxrunat =serverText ='<%#Bind(Date)%>'/>
< asp:TextBox ID = Dr_CrTextBoxrunat =serverText ='<%#Bind([Dr / Cr])%>'/>
< a sp:TextBox ID =Dr_Cr_AmmountTextBoxrunat =serverText ='<%#Bind([Dr / Cr Ammount])%>'/>
< asp: TextBox ID =TotalTextBoxrunat =serverText ='<%#Bind(Total)%>'/>
< emptydatatemplate> ;
< table runat =serverstyle =background-color:#FFFFFF; border-collapse:collapse; border-color:#999999; border-style:none; border-width: 1px;>
未返回任何数据。
< insertitemtemplate>
< asp:Button ID =InsertButtonrunat =serverCommandName =InsertText = 插入/>
< asp:按钮ID =CancelButtonrunat =serverCommandName =取消文字=清除/>
< asp:TextBox ID =Account_no_TextBoxrunat =serverText ='<%#Bind(Account_no。)%>'/>
< asp:TextBox ID =DateTextBoxrunat =serverText ='<%#Bind(Date)%>'/>
< asp:TextBox ID =Dr_CrTextBoxrunat =服务器Text ='<%#Bind([Dr / Cr])%>'/>
< asp:TextBox ID =Dr_Cr_AmmountTextBoxrunat =se rverText ='<%#Bind([Dr / Cr Ammount])%>'/>
< asp:TextBox ID =TotalTextBoxrunat =server Text ='<%#Bind(Total)%>'/>
< itemtemplate>
< asp:Label ID =Account_no_Labelrunat =serverText ='<%#Eval(Account_no。)%>'BorderStyle =Dashed/>
< asp :Label ID =DateLabelrunat =serverText ='<%#Eval(Date)%>'/>
< asp:Label ID =Dr_CrLabel runat =serverText ='<%#Eval([Dr / Cr])%>'/>
< asp:Label ID =Dr_Cr_AmmountLabelrunat =服务器Text ='<%#Eval ([Dr / Cr Ammount])%>'/>
< asp:Label ID =TotalLabelrunat =serverText ='<%#Eval(总计)%>'/>
< layouttemplate>
< table runat =server>
< tr runat =server>
< td runat =server>
< table id =itemPlaceholderContainer runat =serverborder =1style =background-color:#FFFFFF; border-collapse:collapse; border-color:#999999; border-style:none; border-width:1px; font-family:Verdana ,Arial,Helvetica,sans-serif;>
< tr runat =serverstyle =background-color:#DCDCDC; color:#000000;>
< th runat =server> Account_no。
< th runat =server>日期
< th runat =server> Dr / Cr
< th runat =server> Dr / Cr Ammount
< th runat =server>总计
< tr id =itemPlaceholderrunat =服务器>
< tr runat =服务器>
< td runat =serverstyle =text-align:center; background-color:#CCCCCC; font-family:Verdana,Arial,Helvetica,sans-serif;颜色:#000000;>
< SelectedItemTemplate>
< asp:Label ID =Account_no_Labelrunat =serverText ='<%#Eval(Account_no。)%>'/>
< asp:标签ID =DateLabelrunat =serverText ='<%#Eval(Date)%>'/>
< asp:Label ID =Dr_CrLabelrunat = serverText ='<%#Eval([Dr / Cr])%>'/>
< asp:Label ID =Dr_Cr_AmmountLabelrunat =serverText ='<%#Eval([Dr / Cr Ammount])%>'/>
< asp:Label ID =TotalLabelrunat =serverText =' <%#Eval(Total)%>'/>
< / SelectedItemTemplate>
< / form> ;
< / body>
< / html>
<asp:SqlDataSource ID="dslist" runat="server" ConnectionString="Data Source=DIPTO\SQLEXPRESS;Initial Catalog=registration;Persist Security Info=True;User ID="cyclic order";Password=dipto012" ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM [Transaction]">
<asp:ListView ID="ListView1" runat="server" DataKeyNames="Account_no." DataSourceID="dslist" EnableModelValidation="True" OnSelectedIndexChanged="ListView1_SelectedIndexChanged">
<alternatingitemtemplate>
<asp:Label ID="Account_no_Label" runat="server" Text='<%# Eval("Account_no.") %>' />
<asp:Label ID="DateLabel" runat="server" Text='<%# Eval("Date") %>' />
<asp:Label ID="Dr_CrLabel" runat="server" Text='<%# Eval("[Dr/Cr]") %>' />
<asp:Label ID="Dr_Cr_AmmountLabel" runat="server" Text='<%# Eval("[Dr/Cr Ammount]") %>' />
<asp:Label ID="TotalLabel" runat="server" Text='<%# Eval("Total") %>' />
<edititemtemplate>
<asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="Update" />
<asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Cancel" />
<asp:TextBox ID="Account_no_TextBox" runat="server" Text='<%# Bind("Account_no.") %>' />
<asp:TextBox ID="DateTextBox" runat="server" Text='<%# Bind("Date") %>' />
<asp:TextBox ID="Dr_CrTextBox" runat="server" Text='<%# Bind("[Dr/Cr]") %>' />
<asp:TextBox ID="Dr_Cr_AmmountTextBox" runat="server" Text='<%# Bind("[Dr/Cr Ammount]") %>' />
<asp:TextBox ID="TotalTextBox" runat="server" Text='<%# Bind("Total") %>' />
<emptydatatemplate>
<table runat="server" style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;">
No data was returned.
<insertitemtemplate>
<asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" />
<asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Clear" />
<asp:TextBox ID="Account_no_TextBox" runat="server" Text='<%# Bind("Account_no.") %>' />
<asp:TextBox ID="DateTextBox" runat="server" Text='<%# Bind("Date") %>' />
<asp:TextBox ID="Dr_CrTextBox" runat="server" Text='<%# Bind("[Dr/Cr]") %>' />
<asp:TextBox ID="Dr_Cr_AmmountTextBox" runat="server" Text='<%# Bind("[Dr/Cr Ammount]") %>' />
<asp:TextBox ID="TotalTextBox" runat="server" Text='<%# Bind("Total") %>' />
<itemtemplate>
<asp:Label ID="Account_no_Label" runat="server" Text='<%# Eval("Account_no.") %>' BorderStyle="Dashed" />
<asp:Label ID="DateLabel" runat="server" Text='<%# Eval("Date") %>' />
<asp:Label ID="Dr_CrLabel" runat="server" Text='<%# Eval("[Dr/Cr]") %>' />
<asp:Label ID="Dr_Cr_AmmountLabel" runat="server" Text='<%# Eval("[Dr/Cr Ammount]") %>' />
<asp:Label ID="TotalLabel" runat="server" Text='<%# Eval("Total") %>' />
<layouttemplate>
<table runat="server">
<tr runat="server">
<td runat="server">
<table id="itemPlaceholderContainer" runat="server" border="1" style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;font-family: Verdana, Arial, Helvetica, sans-serif;">
<tr runat="server" style="background-color:#DCDCDC;color: #000000;">
<th runat="server">Account_no.
<th runat="server">Date
<th runat="server">Dr/Cr
<th runat="server">Dr/Cr Ammount
<th runat="server">Total
<tr id="itemPlaceholder" runat="server">
<tr runat="server">
<td runat="server" style="text-align: center;background-color: #CCCCCC;font-family: Verdana, Arial, Helvetica, sans-serif;color: #000000;">
<SelectedItemTemplate>
<asp:Label ID="Account_no_Label" runat="server" Text='<%# Eval("Account_no.") %>' />
<asp:Label ID="DateLabel" runat="server" Text='<%# Eval("Date") %>' />
<asp:Label ID="Dr_CrLabel" runat="server" Text='<%# Eval("[Dr/Cr]") %>' />
<asp:Label ID="Dr_Cr_AmmountLabel" runat="server" Text='<%# Eval("[Dr/Cr Ammount]") %>' />
<asp:Label ID="TotalLabel" runat="server" Text='<%# Eval("Total") %>' />
</SelectedItemTemplate>
</form>
</body>
</html>
这篇关于我的代码遇到了一些问题;我没有解决它。请帮助我.........!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!