C
cmrchs
Hi,
I am creating a simple calculator to add 2 values.
For the user to enter a value, I have created a web user control
consisting of a textbox and some additional logic.
I add 2 of those webuser controls on an asp.net form, one for each
value.
added as well ON THE FORM (and not in the user control) are a button
(btnAdd) and a label to display the result (lblResult)
Now, i run it ... enter 2 values, press Add and the result is
displayed in the label ... easy.
But what i want now is that when I change one of the values in one of
the textboxes in the user control (during 'onkeypress' in javascript)
is that the text in the label control be cleared.
for this to happen, I can not just implement it in the onkeypress of
the textbox, since the label control is not part of the user control
you see?
so what I need, I think, is to raise some event in onkeypress (in the
webuser control) and implement the event handler in the host form but
whithout a postback to the server !
any ideas?
thank you
Chris
I am creating a simple calculator to add 2 values.
For the user to enter a value, I have created a web user control
consisting of a textbox and some additional logic.
I add 2 of those webuser controls on an asp.net form, one for each
value.
added as well ON THE FORM (and not in the user control) are a button
(btnAdd) and a label to display the result (lblResult)
Now, i run it ... enter 2 values, press Add and the result is
displayed in the label ... easy.
But what i want now is that when I change one of the values in one of
the textboxes in the user control (during 'onkeypress' in javascript)
is that the text in the label control be cleared.
for this to happen, I can not just implement it in the onkeypress of
the textbox, since the label control is not part of the user control
you see?
so what I need, I think, is to raise some event in onkeypress (in the
webuser control) and implement the event handler in the host form but
whithout a postback to the server !
any ideas?
thank you
Chris