Click here to Skip to main content
15,885,720 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is there any method in vb.net for web pages for this type of problem

i have label1, textbox1 and label2.
i want that if i enter value in textbox1 , and there is some value in label1. the result of label1 * textbox1 should be displayed in label2, without any button click code, i dont want to place button there for calculation. is there any method as user enters value in textbox the result will be shown in label2.
Posted

Write your code under TextBox1_TextChanged event......
 
Share this answer
 
Comments
Jasbeer Singh 5-Dec-12 6:41am    
i did this but it didn't worked
[no name] 5-Dec-12 6:42am    
Can you post your code ??
try onblur or onkeydown event of textbox...
onblur will fire every time when focus goes out of textbox
 
Share this answer
 
Perform the calculation on TextChanged event or may be key press event of the textbox
 
Share this answer
 
Comments
Jasbeer Singh 5-Dec-12 6:42am    
i did this already, but it didn't worked
dimpledevani 5-Dec-12 6:58am    
Can you post your code and explain in detail what you performed??
Hi,

Call java script function on Textbox's onblur. It will do but only on lost focus. Or better is use onkeydown of textbox in Java script.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900