Hi,
I have a text box based on text box value some label value's changed.So now when i click enter after puting some value in text box my image button fires which i dont want.I only want to fire TextChanged Event when i click enter on that textbox.
Loading

Ashish4 reputationPosted Oct 25, 2010, 11:57 PM EDT
and then use the onclientclick of the hidden dummy button to retun false and de focus the text box.
Apurva Mehta34 reputationPosted Oct 26, 2010, 8:37 PM EDT
Sam HobbsRank #107 · 20.5K reputationPosted Oct 26, 2010, 9:22 PM EDT
Is the textbox a multiline textbox? Do you have that property set? If you understand what that is and are unable to do that due to the requirments of your application, then there are other possiblities. I know what to do using C++ and using the Wiindows SDK but I need to look at what needs to be done for .Net. So please provide the clarification I request above and if you still need help after that then I will try to find the answer.
I will say though that if the problem is that the enter key is causing a button to be clicked, then the answer is not to add a hidden button, the answer is to remove the button from the properties that specify what button to use (click) when the Enter key is used.
Apurva Mehta34 reputationPosted Oct 26, 2010, 10:18 PM EDT
Sam HobbsRank #107 · 20.5K reputationPosted Oct 26, 2010, 11:40 PM EDT
Suthish NairRank #92 · 22.8K reputationPosted Oct 27, 2010, 3:21 AM EDT
I suggest to do your calculation on client side using javascript.
And call the javascript function on events like onKeypress, onchange of textbox .. etc..
What calculations your doing?
Apurva Mehta34 reputationPosted Oct 27, 2010, 6:31 PM EDT
Problem : When user click enter on any part of screen it calls the first Image button to fires and execute the button method.
Solution : What i did i place another image button at first position on aspx page and set its Width="1px" which cannot be seen during runtime and Onclick of this image button i am calling a empty method.So one user click enter it dont fire any other image button.
Sam HobbsRank #107 · 20.5K reputationPosted Oct 27, 2010, 7:32 PM EDT
Suthish NairRank #92 · 22.8K reputationPosted Oct 27, 2010, 9:42 PM EDT
I even dont' know it was a web application..
i just shoot a reply for the post, hoping its a website..