hi,
I am using radtextbox to enter text. I need to show confirm box when user changed the value in the textbox. So i added onvaluechanging method like as fowllows:
This work correctly. But i need to add this function from the code behind because of 2 reasons
1. I use this textbox for insert and update functions. When update only need to ask the confirm.
- i can handle this in script itself by comparing oldvalue and newvale
2. I need to pass myown message t the confrm box.
- For this i want to add this event from the code behind.
How can i add this function to the textbox attribute?
How can i pass message without affect the eventArgs values?
I am using radtextbox to enter text. I need to show confirm box when user changed the value in the textbox. So i added onvaluechanging method like as fowllows:
function ConfirmUpdate(sender, eventArgs) { |
var oldvalue = eventArgs.get_oldValue() |
if (confirm('Are you want to Continue? ') != true) |
eventArgs.set_newValue(oldvalue) |
} |
This work correctly. But i need to add this function from the code behind because of 2 reasons
1. I use this textbox for insert and update functions. When update only need to ask the confirm.
- i can handle this in script itself by comparing oldvalue and newvale
2. I need to pass myown message t the confrm box.
- For this i want to add this event from the code behind.
How can i add this function to the textbox attribute?
How can i pass message without affect the eventArgs values?