asp.net(vb)问题
login.aspx.vb:
Public ReadOnly Property nameT() As String
Get
Return TextBox1.Text
End Get
End Property
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Server.Transfer("webTop.aspx")
End Sub
webTop.aspx.vb:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim w As Login
w = CType(Context.Handler, Login) <------运行到这里报错
End Sub
错误提示:
无法将类型为“ASP.login_aspx”的对象强制转换为类型“System.Web.UI.WebControls.Login”。