Link to home
Start Free TrialLog in
Avatar of Dawie de Villiers
Dawie de Villiers

asked on

Text Changed Event

Does Text changed event work on ASP Pages. I want the event to be trigerred after i type in a character in a textbox. I have set the autopostback to true on the textbox but the event is only trigerred after i click on another control which will submit the form. I even tried registering the event at startup in javascript like tboContent.Attribute.Add("OnChange","return TxtChange();") but still diint work.
 protected void tboContent_TextChanged(object sender, EventArgs e)
    {
        if (tboCharacters.Text.Length <= 160)
        {
            tboCharacters.Text = Convert.ToString(160 - Convert.ToInt64(tboContent.Text.Length - 1));
        }
    }
SOLUTION
Avatar of kerwinsiy
kerwinsiy
Flag of Philippines image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dawie de Villiers
Dawie de Villiers

ASKER

Thank you very much guys,
I finally figured out how to solve this, the "onkeyup event" doesnt need a postback and its updating the other textbox perfectly without a postback.

Thnak you very much