Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
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 5-Dec-12 0:31am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Write your code under TextBox1_TextChanged event......
  Permalink  
Comments
Jasbeer Singh at 5-Dec-12 6:41am
   
i did this but it didn't worked
Krunal Rohit at 5-Dec-12 6:42am
   
Can you post your code ??
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

try onblur or onkeydown event of textbox...
onblur will fire every time when focus goes out of textbox
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 6

solved this using textchanged event
  Permalink  
Comments
Marcus Kramer at 7-Dec-12 10:17am
   
Since Solution 1 worked for you, why not go back to it and mark it as the correct answer and credit the member for helping. Cheers.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Perform the calculation on TextChanged event or may be key press event of the textbox
  Permalink  
Comments
Jasbeer Singh at 5-Dec-12 6:42am
   
i did this already, but it didn't worked
dimpledevani at 5-Dec-12 6:58am
   
Can you post your code and explain in detail what you performed??
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 5

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.
  Permalink  
v2

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

  Print Answers RSS
0 CHill60 360
1 Sarvesh Kumar Gupta 213
2 OriginalGriff 193
3 Peter Leow 155
4 RyanDev 145


Advertise | Privacy | Mobile
Web03 | 2.8.140709.1 | Last Updated 7 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid