I have a textbox
in one grid-view column where upon entering a particular value and losing focus of the textbox, should post to the server to get the text validated through a server-side method. If the entry is valid, a result set to fill rest of row cells would be returned, else the bgcolor of the textbox needs to be changed to Red.
I tried posting back through the obvious way, i.e. making the textbox's autopostback
as true
and wiring up a server-side OnTextChanged
event handler to validate the entered value.
It is working with this setup, but is also affecting the remaining page controls behaviour. For example, if I click a button in some other grid after entering some text in the textbox, the OnTextChanged
handler gets called thus preventing the button's click
event, which I also wish to call to execute its functionality.
Kindly suggest what alternatives/corrections I should carry out to enable textbox content server-side validation plus making the other controls/updatepanels work as expected.