Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Debugging at remote site
Message
From
17/12/2010 09:45:54
 
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01492839
Message ID:
01493089
Views:
40
>>>Can you hook the Page.PreRender event and log the Textbox value there as it is going out the door? At least that might tell you whether the weirdness is occuring on the server or the browser.
>>
>>I've added this code:
>>
>>
        protected override void OnPreRender(EventArgs e)
>>        {
>>            StreamWriter SW;
>>            SW = File.CreateText("c:\\SIAS\\SIASPrerenderLog.txt");
>>            SW.WriteLine("Base Premium: " + txtPremium.Text);
>>            SW.Close();
>>
>>            base.OnPreRender(e);
>>        }
>>
>>and the log file shows that at this point in time, the txtPremium.Text = 104.22, so somewhere after this it is getting set back to 102.87.
>>
>>What event/method would be the next place to check?
>
>Here's the Page life cycle: http://msdn.microsoft.com/en-us/library/ms178472.aspx
>You *could* check at the Render stage - or even at the Unload :
protected void Page_Load(object sender, EventArgs e)
>        {
>            Unload += new EventHandler(Page_Unload);
>        }
>
>        protected override void Render(HtmlTextWriter writer)
>        {
>            //Check here
>            base.Render(writer);
>        }
>
>        void Page_Unload(object sender, EventArgs e)
>        {
>            //Check here
>        }
but I'd be surprised if it had changed. Sounds more like a ViewState, cacheing or browser issue? Any Javascript in the page on the browser?

Thanks for the link to the life cycle. I've cleared out the cookies etc, but that hasn't helped.

This is all the javascript in the page:
    <script src="js/jquery.js" type="text/javascript"></script>
 
    <script src="js/jquery.maskedinput.js" type="text/javascript"></script>
 
    <script type="text/javascript" src="js/jquery.formatCurrency.js"></script>   
    
    <script type="text/javascript">
        jQuery(function($) {
            $(".number").mask("999999999.99");
            $(".date").mask("99/99/9999");
            $(".code6").mask("999999");
        })
        
        $(document).ready(function() {
            $('.currency').blur(function() {
            $('.currency').formatCurrency({
                groupDigits: false,
                symbol: ''
            });
            });
        });
     </script>
I've put code to check the value of the text box at various stages and here's what I've found:

OnLoad: 102.87
PreRender: 104.22
PreRenderComplete: 104.22
OnLoadComplete: 104.22

But yet the display value on the form itself is still 102.87!

Does this make any sense at all???
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform