Click here to Skip to main content
12,688,944 members (30,669 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: VB 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 1: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 5-Dec-12 6:41am
   
i did this but it didn't worked
Krunal Rohit 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 2

Perform the calculation on TextChanged event or may be key press event of the textbox
  Permalink  
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??
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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.170113.4 | Last Updated 23 Mar 2016
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100