asp.net购物车问题

2013 年 1 月 5 日3300

<tablestyle="font-size:9pt;font-family:宋体;width:574px;height:806px;background-repeat:no-repeat;background-image:url(images/显示页面当前位置.jpg);">
<tr>
<tdstyle="height:20px"valign="middle"align="left">
<br/><br/>
目前位置:首页>购物车
</td>
</tr>
<tr>
<tdvalign=topstyle="height:786px">
<tablecellSpacing="0"cellPadding="0"width="95%"align="center"border="0"style="FONT-SIZE:9pt">
<tr>
<tdalign="center">
<asp:LabelID="labMessage"runat="server"Visible="False"></asp:Label></td>
</tr>
<tr>
<tdalign="left"style="height:30px">
<asp:LabelID="labTotalPrice"runat="server"Text="0.00"></asp:Label>¥</td>
</tr>
<trstyle="font:9pt;font-family:宋体;"valign=top>
<tdalign="left"style="height:135px">

<asp:GridViewID="gvShopCart"DataKeyNames="BookID"runat="server"AutoGenerateColumns="False"AllowPaging="True"OnPageIndexChanging="gvShopCart_PageIndexChanging"BackColor="LightGoldenrodYellow"BorderColor="Tan"BorderWidth="1px"CellPadding="2"ForeColor="Black"GridLines="None">
<Columns>
<asp:BoundFieldDataField="No"HeaderText="序号"ReadOnly="True">
<ItemStyleHorizontalAlign="Center"/>
<HeaderStyleHorizontalAlign="Center"/>
</asp:BoundField>
<asp:BoundFieldDataField="BookID"HeaderText="商品ID"ReadOnly="True">
<ItemStyleHorizontalAlign="Center"/>
<HeaderStyleHorizontalAlign="Center"/>
</asp:BoundField>
<asp:BoundFieldDataField="BookName"HeaderText="商品名称"ReadOnly="True">
<ItemStyleHorizontalAlign="Center"/>
<HeaderStyleHorizontalAlign="Center"/>
</asp:BoundField>
<asp:TemplateFieldHeaderText="数量">
<ItemTemplate>
<asp:TextBoxID="txtNum"runat="server"Text=<%#Eval("Num")%>Width=60pxOnTextChanged="txtNum_TextChanged"></asp:TextBox>
<asp:RegularExpressionValidator
ID="RegularExpressionValidator1"runat="server"ControlToValidate="txtNum"
ErrorMessage="×"ValidationExpression="^+?[1-9][0-9]*></asp:RegularExpressionValidator>
</ItemTemplate>
</asp:TemplateField>

<asp:TemplateFieldHeaderText=单价>
<HeaderStyleHorizontalAlign=Center/>
<ItemStyleHorizontalAlign=Center/>
<ItemTemplate>
<%#Eval("price")%>¥
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateFieldHeaderText=总价>
<HeaderStyleHorizontalAlign=Center/>
<ItemStyleHorizontalAlign=Center/>
<ItemTemplate>
<%#Eval("totalPrice")%>¥
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderStyleHorizontalAlign=Center/>
<ItemStyleHorizontalAlign=Center/>
<ItemTemplate>
<asp:LinkButtonID="lnkbtnDelete"runat="server"CommandArgument='<%#Eval("BookID")%>'OnCommand="lnkbtnDelete_Command">删除</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>

</Columns>
<FooterStyleBackColor="Tan"/>
<SelectedRowStyleBackColor="DarkSlateBlue"ForeColor="GhostWhite"/>
<PagerStyleBackColor="PaleGoldenrod"ForeColor="DarkSlateBlue"HorizontalAlign="Center"/>
<HeaderStyleBackColor="Tan"Font-Bold="True"/>
<AlternatingRowStyleBackColor="PaleGoldenrod"/>
</asp:GridView>
</td>
</tr>
<tralign=leftvalign=top>
<tdalign="center">
<asp:LinkButtonID="lnkbtnUpdate"runat="server"OnClick="lnkbtnUpdate_Click">更新购物车</asp:LinkButton>
<asp:LinkButtonID="lnkbtnClear"runat="server"OnClick="lnkbtnClear_Click">清空购物车</asp:LinkButton>
<asp:LinkButtonID="lnkbtnContinue"runat="server"OnClick="lnkbtnContinue_Click">继续购物</asp:LinkButton>
<asp:LinkButtonID="lnkbtnCheck"runat="server"OnClick="lnkbtnCheck_Click">前往服务台</asp:LinkButton>
</td>
</tr>
<tr>
<tdalign="left">
<br/>
<li>如果要修改商品数量,请单击“更新购物车”按钮</li><li>如果要取消某个商品,请直接单击表格控件中的“删除”
<br/>
</li>
</td>
</tr>
</table>
</td>
</tr>
</table>

0 0