Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 2.0 and Visual Studio. 2005 > .NET Framework 2.0
.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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old March 15th, 2007, 03:31 PM
Authorized User
Join Date: Oct 2004
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

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 08:28 AM
How to display dataset using textbox RockNRoll ASP.NET 1.0 and 1.1 Basics 1 July 4th, 2003 07:37 AM

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