Click here to Skip to main content
15,890,409 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
for (int k = 0; k < 10; k++)
            {

                

 void tb1_TextChanged(object sender, EventArgs e)// this event is not fire.
        {

           
        }
Posted
Updated 7-Aug-12 18:46pm
v3
Comments
Kenneth Haugland 8-Aug-12 0:35am    
i think text change only fires on keybord events....
Sergey Alexandrovich Kryukov 8-Aug-12 0:37am    
I guess only because there is no a way to change a text only with a mouse... :-)
It does not help to solve the problem. However... unless OP failed to see that the event is actually fired. Such things happen.
--SA
Kenneth Haugland 8-Aug-12 0:41am    
laugh... I thought he meant when he change the text in code... I dont think they fire at that event
Pankaj Nikam 8-Aug-12 1:01am    
We can change the text with mouse using OSK ;)
Sergey Alexandrovich Kryukov 8-Aug-12 12:54pm    
This is what I say. This issue is unrelated to this problem...
--SA

You have to specify the AutoPostBack property of the text box to true.

In aspx,
C#
<asp:textbox id="txtTest" autopostback="true" runat="server" ontextchanged="txtTest_Changed" xmlns:asp="#unknown"></asp:textbox>


In code-behind,
C#
protected void txtTest_Changed(object sender, EventArgs e)
{
    // your code goes here
}
 
Share this answer
 
Comments
Prasad J 8-Aug-12 1:20am    
please remove 'xmlns:asp="#unknown"' from the aspx
Set Autopostback property to true for the textbox.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900