asp.net 如何在网络表单中为命名空间编码 VB 语言

asp.net how to code for Namespace in web-forms VB language

我在使用 VB 语言编写 WebForm 应用程序时从未使用过命名空间。我可以根据我的一个文件中的代码片段看一个合适的例子吗?我不知道 在哪里放置 "Namespace spacename" 句子。 由于我的代码引用了 filename.aspx.vb 文件中的部分 class,因此 [= 中的命名空间引用 coded/represented 是怎样的? 24=]文件作为网页的美工设计。

Option Explicit On

Imports System
Imports System.Data
Imports System.Data.Sql
Imports System.Data.SqlClient
Imports System.Diagnostics
Imports Microsoft.VisualBasic

Partial Class Reports01
   Inherits System.Web.UI.Page

   Private Enum eFORMSTATE As Integer
   ... working VB code with methods and events follows...

End Class

这样使用

Namespace XXX

Partial Class Reports01
...
End Class

End Namespace

还从

更改 aspx 文件
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Reports01.aspx.vb" Inherits="Reports01" %>

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Reports01.aspx.vb" Inherits="XXX.Reports01" %>