Ik probeer zelf zo'n file te maken die boven aan de pagina Import (volgens mij heet het een component maar weet niet zeker)
Dit is mijn code:
Default.aspx
Functions.vb
CodeBehind/Default.aspx.vb
Maar het werkt niet
kan iemand mij vertellen wat ik fout doe?
Dit is mijn code:
Default.aspx
code:
1
2
3
4
5
6
7
8
9
| <%@ Page language="VB" Src="CodeBehind/Default.aspx.vb" Inherits="ComTest.CodeBehind" %> <html> <body> <asp:Label id="lbMessage" runat="server" /> </body> </html> |
Functions.vb
code:
1
2
3
4
5
6
7
8
9
10
11
| Namespace ComTest
Class Functions
Public Function test()
Return "yea!!!"
End Function
End Class
End NameSpace |
CodeBehind/Default.aspx.vb
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
| Imports System
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports ComTest.Function
Namespace ComTest
Public Class CodeBehind : Inherits Page
Public lbMessage As Label
Private Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
lbMessage.Text = Test()
End Sub
End Class
End Namespace |
Maar het werkt niet
[ Voor 20% gewijzigd door Verwijderd op 09-02-2005 14:36 ]