ASP.NET User Control

B

Brett Wesoloski

I have a user control that has a text box in it. Well what I would like to
happen is when a user changes the text my aspx page will know and fire so I
can run some code behind.

I have tried many things and have looked on google but can't find what I am
looking for.

This is what I have in my user control

Public Event DateTextChanged(ByVal sender As Object, ByVal e As EventArgs)



Public Sub txtStartDate_TextChanged(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles txtStartDate.TextChanged

RaiseEvent DateTextChanged(sender, e)

End Sub





This is what I have on my aspx page.

AddHandler calDateFrom.DateTextChanged, AddressOf
calDateFrom_DateTextChanged

Private Sub calDateFrom_DateTextChanged(ByVal sender As Object, ByVal e As
EventArgs) Handles calDateFrom.DateTextChanged

MsgBox("test")

End Sub



I have also tried AddHandler calDateFrom.DateTextChanged, Address of
calDateFrom.txtStartDate_TextChanged

Any one know what I am missing?



TIA,
Brett
 
J

JV

You may want to trace each step in the debugger to make sure your
txtStartDate_TextChanged() function is getting called in the first place.
Then at least you will have a good idea where the point of failure is.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,888
Messages
2,569,964
Members
46,294
Latest member
HollieYork

Latest Threads

Top