Mr_Shaw
asked on
C# Handles
In vb it is possible to use handles to extend the use of a function/event.
I tried doing the same thing in c# and it did not work.
Here is my code.
protected void UpdateTextBoxes_Textchange d(object sender, EventArgs e)Handle Textbox1.TextChanged, TextBox2.TextChanged
{
}
But it does not work... Can anybody help?
I tried doing the same thing in c# and it did not work.
Here is my code.
protected void UpdateTextBoxes_Textchange
{
}
But it does not work... Can anybody help?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ItemCreated?
ASKER
I used the event ItemCreated but It returned
Object reference not set to an instance of an object.
Object reference not set to an instance of an object.
ASKER
thanks
ASKER
I have put breakpoints in and it never gets to the event.
protected void btnNext_Click(object sender, EventArgs e)
{
updateDB();
}
protected void updateDB()
{
TextBox Comments = (TextBox)FormView1.FindCon
Comments.TextChanged += UpdateTextBoxes_Textchange
}
protected void UpdateTextBoxes_Textchange
{
Response.Write("Empty");
}