在WEB里学用应用程序出问题
在窗体中放了两个Html server控件.txtServerTextField与btnServerButton
Public Class WebForm1
Inherits System.Web.UI.Page
Protected WithEvents txtServerTextField As System.Web.UI.HtmlControls.HtmlInputText
Protected WithEvents btnServerButton As System.Web.UI.HtmlControls.HtmlInputButton
" Web 窗体设计器生成的代码 "
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'下面一行是出错的地方
txtServerTextField.Value = "click the button ==>"
End Sub
出错提示为:异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。
请问该如何解决??