Herfried:
Thanks.
This is a ASP.NET application that uses UltraWebTab from Infragistics. One
of the tabs contains a textbox that I want to trap the TextChanged event.
This is what I have:
I tried to do the same thing in vb.ne but it does not work.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim txt As TextBox
Dim button As New Button
txt = Me.uwtMain.FindControl("tbxLong") 'this is the textbox that I am
tried to trap the TextChanged event
If Not txt Is Nothing Then
AddHandler txt.TextChanged, AddressOf Me.tbxLong_Clicked
End If
End Sub
Private Sub tbxLong_Clicked(ByVal sender As Object, ByVal e As
System.EventArgs)
lblRecords.Text = "Do you see this?"
End Sub
When I run the application, the object lnlRecords.Text does not change. The
control does not even pass into this subroutine.
What am I doing wrong?
"Herfried K. Wagner [MVP]" wrote:
"vvenk" <vv***@discussions.microsoft.com> schrieb: I came across the following code in C# that adds a custom event handler
for
triggering the click event on a button:
System.Web.UI.WebControls.Button button;
object buttonOnTab1 =
this.UltraWebTab1.Tabs.GetTab(0).FindControl("Butt on1");
if(buttonOnTab1 != null)
{
button = (System.Web.UI.WebControls.Button)buttonOnTab1;
button.Click += new System.EventHandler(this.ButtonOnTab1Clicked);
}
Can somebody tell me how this code can be re-written using VB.Net?
\\\
AddHandler m_Button1.Click, AddressOf Me.Button1_Click
///
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>