A
Anand Sagar
My program requirement is to create 2 textboxes at run time. When the cursor
leaves the first textbox, (i guess the TextChange event) I want something to
occur (post data into database)
Problem is that in Which event of the Webform do I create the run-time
textboxes ?
Also, how can I raise the events ? Please check my code, give suggetions.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim t1 As New TextBox()
Dim t2 As New TextBox()
t1.Text = "sagar"
t1.ID = "t1"
AddHandler t1.TextChanged, AddressOf DoThis
Panel1.Controls.Add(t1)
t2.Text = "Tres"
t2.ID = "t2"
Panel1.Controls.Add(t2)
End Sub
Protected Sub DoThis(ByVal sender As Object, ByVal e As EventArgs)
Response.Write("feeling great")
End Sub
Thanks,
Anand Sagar
leaves the first textbox, (i guess the TextChange event) I want something to
occur (post data into database)
Problem is that in Which event of the Webform do I create the run-time
textboxes ?
Also, how can I raise the events ? Please check my code, give suggetions.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim t1 As New TextBox()
Dim t2 As New TextBox()
t1.Text = "sagar"
t1.ID = "t1"
AddHandler t1.TextChanged, AddressOf DoThis
Panel1.Controls.Add(t1)
t2.Text = "Tres"
t2.ID = "t2"
Panel1.Controls.Add(t2)
End Sub
Protected Sub DoThis(ByVal sender As Object, ByVal e As EventArgs)
Response.Write("feeling great")
End Sub
Thanks,
Anand Sagar