Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 2.0 and Visual Studio. 2005 > .NET Framework 2.0
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 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 Display Modes
  #1 (permalink)  
Old March 15th, 2007, 03:31 PM
Authorized User
Join Date: Oct 2004
Location: , , .
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default Textbox GUI display different from it's .Text

I have a couple of textboxes and when a user types in one of them I run javascript to update the other boxes. For a user stand point it works fine. However, when I debug it the textboxes, that textboxes that autoupdated through my javascript, their Textbox.Text field have the values in them before the autoupdate. It's weird because the Textbox that is not read only has the correct value in it's .Text field.

This originally worked in .Net 1.x, but when we moved it over to 2.0 it no longer worked.

I think that it may have somehting to do with the Javascript, but I'm not sure.

Here is the Javascript Function
function CalculateInventoryExposureLimit()
    var a = removeCurrency(document.getElementById('<%=txtCurr entOnOrderPosition.ClientID%>').value);
    var b = removeCurrency(document.getElementById('<%=txtCurr entOnHandPosition.ClientID%>').value);
    var c = removeCurrency(document.getElementById('<%=txtNewO rderExposure.ClientID%>').value);
    var f = removeCurrency(document.getElementById('<%=txtAREx posure.ClientID%>').value);

    var d = parseFloat(a) + parseFloat(b) + parseFloat(c);
    var g = parseFloat(a) + parseFloat(b) + parseFloat(c) + parseFloat(f);

    document.getElementById('<%=txtRequestedTotalInven toryExposureLimit.ClientID%>').value = formatCurrency(d.toFixed(0));
    document.getElementById('<%=txtCFCInventoryExposur eLimit.ClientID%>').value = formatCurrency(d.toFixed(0));
    document.getElementById('<%=txtTotalInventoryandAR Exposure.ClientID%>').value = formatCurrency(g.toFixed(0));
    document.getElementById('<%=txtNewOrderExposure.Cl ientID%>').value = formatCurrency(parseFloat(c).toFixed(0));

As it shows, txtCFCInventoryExposureLimit updates when the user blurs off and it shows correctly, but in the code behind txtCFCInventoryExposureLimit.Text shows something that is different.

Any help would be greatly apprciated.

Michael Hsu

Reply With Quote

Thread Tools
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
How to get and display a data in textbox kakac ASP.NET 2.0 Basics 1 April 20th, 2007 08:12 AM
how to display value to textbox tllcll Javascript 1 October 27th, 2005 09:10 AM
Whats wrong with the GUI display Sandz Java GUI 1 February 5th, 2005 07:28 AM
How to display dataset using textbox RockNRoll ASP.NET 1.0 and 1.1 Basics 1 July 4th, 2003 07:37 AM

All times are GMT -4. The time now is 07:28 PM.

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