</Table>的大~~問題!急!急!急!- 藍色小舖 BlueShop" />
台灣最大程式設計社群網站
線上人數
978
 
會員總數:246038
討論主題:189626
歡迎您免費加入會員
討論區列表 >> ASP.NET >> 關於<asp:Table Runat="server"></Table>的大~~問題!急!急!急!
[]  
[我要回覆]
1
回應主題 加入我的關注話題 檢舉此篇討論 將提問者加入個人黑名單
關於<asp:Table Runat="server"></Table>的大~~問題!急!急!急!
價值 : 0 QP  點閱數:4111 回應數:9
樓主

arthur
初學者
483 60
212 433
發送站內信

捐贈 VP 給 arthur
當我用了<asp:Table runat="server">
...............................
...............................
</asp:table>
後,預覽的時候這行
<%@ Page Language="VB" AutoEventWireup="false" Codebehind="WebForm3.aspx.vb" Inherits="WebApplication1.WebForm3" %>
都會出現這個問題
Could not load type 'WebApplication1.WebForm3'
如果不使用<asp:Table runat="server"></Table>就都沒問題
請問各位高手我如果真要用<asp:Table>來做表格的話我該怎麼做?

本篇文章發表於2003-10-30 17:18
1樓
回應

Steven
檢舉此回應
可否post上你的程式
本篇文章回覆於2003-10-30 17:46
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔--
2樓
作者回應

arthur
捐贈 VP 給 arthur 檢舉此回應
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="add.aspx.vb" Inherits="WebApplication1.WebForm3" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
        <HEAD>
                <title>WebForm3</title>
                <meta content="Microsoft Visual Studio .NET 7.0" name="GENERATOR">
                <meta content="Visual Basic 7.0" name="CODE_LANGUAGE">
                <meta content="JavaScript" name="vs_defaultClientScript">
                <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
        </HEAD>
        <body MS_POSITIONING="GridLayout">
                <form id="form1" method="post" runat="server">
                <asp:Table ID="Table2" Runat="server">
                        <asp:TableRow>
                                <asp:TableCell ColumnSpan="2" HorizontalAlign="Center" Text="新增資料表格"></asp:TableCell>
                        </asp:TableRow>
                        <asp:TableRow>
                                <asp:TableCell HorizontalAlign="Right" Text="帳號:"></asp:TableCell>
                                <asp:TableCell HorizontalAlign="Left">
                                        <asp:TextBox runat="server" ID="MemberID"></asp:TextBox>
                                </asp:TableCell>
                        </asp:TableRow>
                        <asp:TableRow>
                                <asp:TableCell HorizontalAlign="Right" Text="密碼:"></asp:TableCell>
                                <asp:TableCell HorizontalAlign="Left">
                                        <asp:TextBox runat="server" ID="PassWord"></asp:TextBox>
                                </asp:TableCell>
                        </asp:TableRow>
                        <asp:TableRow>
                                <asp:TableCell HorizontalAlign="Right" Text="確認密碼:"></asp:TableCell>
                                <asp:TableCell HorizontalAlign="Left">
                                        <asp:TextBox runat="server" ID="CheckPass"></asp:TextBox>
                                </asp:TableCell>
                        </asp:TableRow>
                        <asp:TableRow>
                                <asp:TableCell HorizontalAlign="Right" Text="姓名:"></asp:TableCell>
                                <asp:TableCell HorizontalAlign="Left">
                                        <asp:TextBox runat="server" ID="Name"></asp:TextBox>
                                </asp:TableCell>
                        </asp:TableRow>
                        <asp:TableRow>
                                <asp:TableCell HorizontalAlign="Right" Text="性別:"></asp:TableCell>
                                <asp:TableCell HorizontalAlign="Left">
                                        <asp:RadioButton runat="server" GroupName="Sex" Text="男" Checked="True" ID="Boy"></asp:RadioButton>
                                        <asp:RadioButton runat="server" GroupName="Sex" Text="女" ID="Girl"></asp:RadioButton>
                                </asp:TableCell>
                        </asp:TableRow>
                        <asp:TableRow>
                                <asp:TableCell HorizontalAlign="Right" Text="電子郵件:"></asp:TableCell>
                                <asp:TableCell HorizontalAlign="Left">
                                        <asp:TextBox runat="server" Width="300px" ID="Email"></asp:TextBox>
                                </asp:TableCell>
                        </asp:TableRow>
                        <asp:TableRow>
                                <asp:TableCell HorizontalAlign="Right" Text="電話:"></asp:TableCell>
                                <asp:TableCell HorizontalAlign="Left">
                                            國碼&nbsp;
                                                <asp:TextBox runat="server" Width="40px" ID="Country"></asp:TextBox>
                                                &nbsp;&nbsp;區碼&nbsp;
                                                <asp:TextBox runat="server" Width="40px" ID="Code"></asp:TextBox>
                                                &nbsp;&nbsp;電話&nbsp;
                                                <asp:TextBox runat="server" ID="Tel"></asp:TextBox>
                                                &nbsp;&nbsp;分機&nbsp;
                                                <asp:TextBox runat="server" Width="40px" ID="Ext"></asp:TextBox>
                                        </asp:TableCell>
                        </asp:TableRow>
                        <asp:TableRow>
                                <asp:TableCell HorizontalAlign="Right" Text="地址:"></asp:TableCell>
                                <asp:TableCell HorizontalAlign="Left">
                                            郵遞區號&nbsp;
                                            <asp:TextBox runat="server" Width="40px" ID="A_Code"></asp:TextBox>
                                                &nbsp;&nbsp;詳細地址&nbsp;
                                            <asp:TextBox runat="server" Width="275px" ID="Address"></asp:TextBox>
                                        </asp:TableCell>
                        </asp:TableRow>
                        <asp:TableRow>
                                <asp:TableCell HorizontalAlign="Right" Text="公司名稱:"></asp:TableCell>
                                <asp:TableCell HorizontalAlign="Left">
                                        <asp:TextBox runat="server" ID="CompanyName"></asp:TextBox>
                                </asp:TableCell>
                        </asp:TableRow>
                        <asp:TableRow>
                                <asp:TableCell HorizontalAlign="Right" Text="業務範圍:"></asp:TableCell>
                                <asp:TableCell HorizontalAlign="Left">
                                        <asp:RadioButtonList runat="server" ID="Sales">
                                                <asp:ListItem Value="1">設計工程師</asp:ListItem>
                                                <asp:ListItem Value="2">設計主管</asp:ListItem>
                                                <asp:ListItem Value="3">產品行銷管理</asp:ListItem>
                                                <asp:ListItem Value="4">採購相關人員</asp:ListItem>
                                                <asp:ListItem Value="5">零件代理</asp:ListItem>
                                                <asp:ListItem Value="7">學術研究</asp:ListItem>
                                                <asp:ListItem Value="8">學生</asp:ListItem>
                                                <asp:ListItem Value="6">其他</asp:ListItem>
                                        </asp:RadioButtonList>
                                        <asp:TextBox runat="server" ID="S_Other"></asp:TextBox>
                                </asp:TableCell>
                        </asp:TableRow>
                        <asp:TableRow>
                                <asp:TableCell HorizontalAlign="Right" Text="公司產品:"></asp:TableCell>
                                <asp:TableCell HorizontalAlign="Left">
                                        <asp:CheckBoxList runat="server" ID="Product">
                                                <asp:ListItem Value="半導體/光電/其他元件及相關服務">半導體/光電/其他元件及相關服務</asp:ListItem>
                                                <asp:ListItem Value="PC/主機版/次系統/">PC/主機版/次系統/</asp:ListItem>
                                                <asp:ListItem Value="可攜式電腦">可攜式電腦</asp:ListItem>
                                                <asp:ListItem Value="PC周邊">PC周邊</asp:ListItem>
                                                <asp:ListItem Value="通訊/電信產品">通訊/電信產品</asp:ListItem>
                                                <asp:ListItem Value="網路產品">網路產品</asp:ListItem>
                                                <asp:ListItem Value="儀器設備">儀器設備</asp:ListItem>
                                                <asp:ListItem Value="消費性電子/家電用品">消費性電子/家電用品</asp:ListItem>
                                                <asp:ListItem Value="保全監控">保全監控</asp:ListItem>
                                                <asp:ListItem Value="車用電子">車用電子</asp:ListItem>
                                                <asp:ListItem Value="工業/軍事用電子">工業/軍事用電子</asp:ListItem>
                                                <asp:ListItem Value="系統整合">系統整合</asp:ListItem>
                                                <asp:ListItem Value="其他">其他</asp:ListItem>
                                        </asp:CheckBoxList>
                                        <asp:TextBox runat="server" ID="P_Other"></asp:TextBox>
                                </asp:TableCell>
                        </asp:TableRow>
                        <asp:TableRow>
                                <asp:TableCell ColumnSpan="2" HorizontalAlign="Center">
                                    <asp:Button runat="server" ID="Add" Text="確定新增" OnClick="Add_Click"></asp:Button>
                                        &nbsp;&nbsp;&nbsp;&nbsp;
                                        <asp:Button runat="server" ID="AddClear" Text="清除重填" OnClick="AddClear_Click"></asp:Button>
                                  </asp:TableCell>
                        </asp:TableRow>
                        </asp:table>
                </form>
        </body>
</HTML>
本篇文章回覆於2003-10-30 17:52
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔--
3樓
回應

Steven
檢舉此回應
你有用 Codebehind 的方式嗎?
本篇文章回覆於2003-10-30 18:00
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔--
4樓
作者回應

arthur
捐贈 VP 給 arthur 檢舉此回應
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="add.aspx.vb" Inherits="WebApplication1.WebForm3" %>
不是就這段嗎?
難道有別的寫法?
還是我誤會這段寫法就是CodeBeHind?
本篇文章回覆於2003-10-30 18:05
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔--
5樓
最有價值解答

Steven
檢舉此回應
WebApplication1.WebForm3 是 namespace
可否post上 WebForm3.aspx.vb
本篇文章回覆於2003-10-31 09:11
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔--
6樓
作者回應

arthur
捐贈 VP 給 arthur 檢舉此回應
Public Class WebForm3
    Inherits System.Web.UI.Page
    Protected WithEvents Table2 As System.Web.UI.WebControls.Table
    Protected WithEvents MemberID As System.Web.UI.WebControls.TextBox
    Protected WithEvents PassWord As System.Web.UI.WebControls.TextBox
    Protected WithEvents CheckPass As System.Web.UI.WebControls.TextBox
    Protected WithEvents Name As System.Web.UI.WebControls.TextBox
    Protected WithEvents Sex As System.Web.UI.WebControls.RadioButton
    Protected WithEvents Email As System.Web.UI.WebControls.TextBox
    Protected WithEvents Country As System.Web.UI.WebControls.TextBox
    Protected WithEvents Code As System.Web.UI.WebControls.TextBox
    Protected WithEvents Tel As System.Web.UI.WebControls.TextBox
    Protected WithEvents Ext As System.Web.UI.WebControls.TextBox
    Protected WithEvents A_Code As System.Web.UI.WebControls.TextBox
    Protected WithEvents Address As System.Web.UI.WebControls.TextBox
    Protected WithEvents CompanyName As System.Web.UI.WebControls.TextBox
    Protected WithEvents Sales As System.Web.UI.WebControls.RadioButtonList
    Protected WithEvents S_Other As System.Web.UI.WebControls.TextBox
    Protected WithEvents Product As System.Web.UI.WebControls.CheckBoxList
    Protected WithEvents P_Other As System.Web.UI.WebControls.TextBox
    Protected WithEvents Add As System.Web.UI.WebControls.Button
    Protected WithEvents AddClear As System.Web.UI.WebControls.Button
#Region " Web Form 設計工具產生的程式碼 "

    '此呼叫為 Web Form 設計工具的必要項。
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    End Sub

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN: 此方法呼叫為 Web Form 設計工具的必要項
        '請勿使用程式碼編輯器來修改它。
        InitializeComponent()
    End Sub

#End Region

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        '在此加入要初始化頁面的使用者程式碼
    End Sub

    Private Sub Add_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Add.Click

    End Sub

    Private Sub AddClear_Click(ByVal sender As Object, ByVal e As EventArgs) Handles AddClear.Click
     

    End Sub
End Class
Sub裡面的內容還沒動手寫~應該沒差吧~
本篇文章回覆於2003-10-31 09:15
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔--
7樓
回應

Steven
檢舉此回應
你少了 namespace WebApplication1
本篇文章回覆於2003-10-31 09:49
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔--
8樓
作者回應

arthur
捐贈 VP 給 arthur 檢舉此回應
請問一下那個要怎麼寫?還是要怎麼做?
本篇文章回覆於2003-10-31 09:55
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔--
9樓
作者回應

arthur
捐贈 VP 給 arthur 檢舉此回應
可以了!我寫出來了~
謝謝您的耐心教導^^
本篇文章回覆於2003-10-31 09:59
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔--
   
1

回覆
如要回應,請先登入.