J
Jason MacKenzie
I'm trying to capture the text property of a dynamically created textbox on
the screen.. I can't get this simple example to work. I get "Object
Reference Not set to instance....." on the Response.Write(text.Text) in the
Button1.Click event handler.
I'm sure this is something painfully simple.
Thanks a lot,
Jason MacKenzie
Public Class WebForm1
Inherits InformetBaseClass.PageFramework
Dim text As TextBox
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
Dim text = New TextBox
CType(Me.FindControl("Form1"), HtmlForm).Controls.Add(text)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Response.Write(text.Text)
End Sub
End Class
the screen.. I can't get this simple example to work. I get "Object
Reference Not set to instance....." on the Response.Write(text.Text) in the
Button1.Click event handler.
I'm sure this is something painfully simple.
Thanks a lot,
Jason MacKenzie
Public Class WebForm1
Inherits InformetBaseClass.PageFramework
Dim text As TextBox
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
Dim text = New TextBox
CType(Me.FindControl("Form1"), HtmlForm).Controls.Add(text)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Response.Write(text.Text)
End Sub
End Class