Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
If statement being bypassed in LEAVE event
Message
From
27/09/2005 10:22:15
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Miscellaneous
Thread ID:
01053400
Message ID:
01053416
Views:
6
>My if condition is never true. I think that I am converting the TextBox.Text property to a decimal value by using the decimal.Parse( ) method, but it does nto work. So, I must be wrong. Anyone see a glaring problem here?
>
>You know, for me, this is a whole lot easier to debug in Visual FoxPro.
>
>Cecil
>
>
>        private void basePriceTextBox_Leave(object sender, EventArgs e)
>        {
>            if (decimal.Parse(this.basePriceTextBox.Text) > 1)
>            {
>                this.stereoCheckBox.Enabled = true;
>                this.leatherInteriorCheckBox.Enabled = true;
>                this.computerNavigationCheckBox.Enabled = true;
>            }
>
>        }
>
Cecil,
With 2005 it looks like I won't be much help but anyway here is what I think.
Is there an error handler that supresses exception messages or not subscribed to event? What happens if you put say:
MessageBox.Show(this.basePriceTextBox.Text);
decimal dec = decimal.Parse(this.basePriceTextBox.Text);
if ( dec != null )
  MessageBox.Show(dec.ToString());
there. Does it get executed? If not than event is not subscribed? ie: Does this exist in code.
this.basePriceMaskedTextBox.Leave += new System.EventHandler(this.basePriceMaskedTextBox_Leave);
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform