Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: Professional ASP.NET 3.5 : in C# and VB ISBN: 978-0-470-18757-9
This is the forum to discuss the Wrox book Professional ASP.NET 3.5: In C# and VB by Bill Evjen, Scott Hanselman, Devin Rader; ISBN: 9780470187579
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 3.5 : in C# and VB ISBN: 978-0-470-18757-9 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 3rd, 2011, 05:21 AM
Registered User
Join Date: Aug 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default onchenge in the textbox(Post back)

Dear members,
I have encountered this problem for sometime but i have failed to get the solution. I have written my code below in C#.net wanting the Webform to automatically calculate the values from the textboxes as they are entered and displays them at the sametime in the result text box. As the user enters. Please go throu this problem below

================================================== =====
private void Qty_Init(object sender, System.EventArgs e)
this.Qty.AutoPostBack = true;
this.Qty.TextChanged += new System.EventHandler(Qty_TextChanged);
================================================== ========

private void Qty_TextChanged(object sender, System.EventArgs e)
Regex regex = new Regex("^[0-9]*&");
if(regex.IsMatch(this.Qty.Text) && !string.IsNullOrEmpty(this.Qty.Text.Trim()))
double Balance1;
double Amount1 = Convert.ToDouble(this.Qty.Text);
double Amount2 = Convert.ToDouble(this.Unit_Cost.Text);

Balance1 = Amount1 * Amount2;
this.AmountPaid.Text = Convert.ToString(Balance1);
//Balance1 = Convert.ToDouble(this.Balance.Text);


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
post back SKhna ASP.NET 2.0 Basics 1 March 10th, 2008 09:23 AM
post back k.manisha ASP.NET 1.0 and 1.1 Professional 2 February 7th, 2007 02:28 PM
Why does the form always post back? Conch General .NET 9 January 9th, 2007 04:12 PM
Post Back rngrmn Pro VB.NET 2002/2003 1 May 5th, 2006 11:21 AM
Post Back rngrmn VB.NET 2002/2003 Basics 2 April 6th, 2006 01:14 PM

All times are GMT -4. The time now is 03:19 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.