熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> .NET編程 >> 正文

ASP.NET項目開發指南:訂購信息[1]

2022-06-13   來源: .NET編程 

    訂購信息

  在ST_kshowproaspx中設有加入購物車超鏈接用來為用戶提供網上訂購的服務單擊該超鏈接將進入ST_userorderproaspx頁面如圖所示

  訂購信息頁面

  ST_userorderproaspx的主要HTML代碼

  此處用到的都是一些簡單的Web控件頁面中的GridView控件也與前面的大同小異ST_userorderpro aspx的主要HTML代碼如程序所示

  程序  ST_userorderproaspx

    <form id=Form method=post runat=server>

        <!頭控件>

        <uc:ST_khead id=Khead runat=server></uc:ST_khead>

    <table width= border= align=center cellpadding=

        cellspacing= bgcolor=#ffffff>

            <tr bgcolor=#>

                <td height= colspan= valign=top>

                    <table width=% height= border=

                cellpadding= cellspacing=><tr><td

                background=images/topbannerjpg>&nbsp;</td></tr>

                    </table>

                </td>

            </tr>

            <tr>

                <td width= align=center valign=top>

                    <uc:ST_kuserleft id=Kuserleft

                        runat=server></uc:ST_kuserleft>

                </td>

                <td colspan= valign=top>

            <table width= height= border= cellpadding=

                    cellspacing= bgcolor=#>

            <tr>

                <td height= bgcolor=#cc><strong><font

                    color=#ffffff>::產品信息</font></strong></td>

            </tr>

        <tr>

            <td bgcolor=#ffffff><table width= border=

            cellspacing= cellpadding=>

        <tr>

            <td><table width= border= cellspacing=

            cellpadding= style=WIDTH: px; HEIGHT: px>

        <tr>

            <td colspan= align=center><strong><font color=#cc>

        訂購信息</font></strong></td></tr>

        <tr><td width= align=right>產品名稱</td>

            <td width=>&nbsp; <asp:Label id=Label

            runat=server>Label</asp:Label></td></tr>

        <tr>

            <td align=right>訂購數量</td>

            <td>&nbsp; <asp:TextBox id=TextBox runat=server

        Width=px></asp:TextBox><FONT face=宋體>件</FONT></td></tr>

        <tr>

            <td align=right>訂購價格</td>

            <td><asp:Label id=Label runat=server>Label</asp:Label>元

                /件</td></tr>

        <tr><td align=right>&nbsp;</td><td>&nbsp;</td></tr></table>

            </td></tr>

        <tr><td>

               <!GridView控件>

        <asp:GridView id=GridView runat=server

         AutoGenerateColumns=False Width=px>

            <Columns>

                <asp:TemplateField>

                    <ItemTemplate>

                        <table width=% border= cellspacing=

                    cellpadding=>

                            <tr>

                                <td height= colspan=

                    align=center><strong><font color=#cc>用戶信息

                            </font></strong></td></tr>

                            <tr>

                                <td width= align=right>真實姓名

                                </td>

                                <td width=><%#

                            Eval(ST_username)%></td>

                            </tr>

                            <tr>

                                <td align=right>聯系電話</td>

                                <td><%# Eval(ST_usertel)%></td>

                            </tr>

                            <tr>

                                <td align=right>聯系地址</td>

                                <td><%# Eval(ST_useraddr)%></td>

                            </tr>

                            <tr>

                                <td colspan=>請確認您上述信息的正確性否則

        可能出現您無法收到物品的情況!如果上述有錯誤請點擊<a

        href=ST_userinfoeditaspx><strong><font color=#cc>此處

        </font></strong></a>修改</td>

                            </tr>

                        </table>

                    </ItemTemplate>

                </asp:TemplateField>

            </Columns>

        </asp:GridView>

        </td></tr>

        <tr><td align=center>&nbsp;

            <asp:Button id=Button runat=server Width=px Text=

            提交訂單 onclick=Button_Click>

            </asp:Button></td></tr></table></td></tr></table>

  

        </td></tr>

    </table>

    <uc:ST_kfoot id=Kfoot runat=server></uc:ST_kfoot>

    </form >

  【代碼說明】在此也是先添加了一個頭控件最後添加了一個尾控件代碼第~行是一個GridView控件綁定了需要購買的物品

[]  []  


From:http://tw.wingwit.com/Article/program/net/201311/15915.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.