Click here to Skip to main content
15,899,025 members
Home / Discussions / C#
   

C#

 
GeneralRe: Unique Problem, Connecting to web service using credentials fail for 1 user only, works for all. Pin
Rizwan Bashir4-Jul-08 1:07
Rizwan Bashir4-Jul-08 1:07 
GeneralRe: Unique Problem, Connecting to web service using credentials fail for 1 user only, works for all. Pin
leppie4-Jul-08 2:07
leppie4-Jul-08 2:07 
GeneralRe: Unique Problem, Connecting to web service using credentials fail for 1 user only, works for all. Pin
Rizwan Bashir4-Jul-08 2:17
Rizwan Bashir4-Jul-08 2:17 
GeneralRe: Unique Problem, Connecting to web service using credentials fail for 1 user only, works for all. Pin
Rizwan Bashir4-Jul-08 4:24
Rizwan Bashir4-Jul-08 4:24 
GeneralRe: Unique Problem, Connecting to web service using credentials fail for 1 user only, works for all. Pin
leppie4-Jul-08 4:35
leppie4-Jul-08 4:35 
QuestionBest practice static class or static variables. Pin
ESTAN4-Jul-08 0:18
ESTAN4-Jul-08 0:18 
AnswerRe: Best practice static class or static variables. Pin
Christian Graus4-Jul-08 0:38
protectorChristian Graus4-Jul-08 0:38 
QuestionProblem with simple arithmetic using textbox and label! Pin
Yosh_4-Jul-08 0:07
professionalYosh_4-Jul-08 0:07 
Hi Guys,
What I'm trying to do is to update a label as numbers are being inputed in a textbox.
The label(lblBalance) is to decrease, or increase, as the value of the textbox(txtAmount) changes.
lastEnteredAmount is a string obj that holds what was previously entered in txtAmount.
lblAmtMax is a label that holds the max amount that the user can enter.
I put the code snippet below in the keyPress event of txtAmount. But i don't get the required result. What am I doing wrong? Confused | :confused:
//input validation already done here<br />
.<br />
.<br />
.<br />
<br />
if (double.Parse(lblAmtMax.Text) < double.Parse(txtAmount.Text) || double.Parse(lblBalance.Text) < 0)<br />
{<br />
    lblBalance.Text = "0.00";<br />
    txtAmount.Text = lblAmtMax.Text;<br />
    return;<br />
}<br />
<br />
//get diffce between amtEntered and last Amt entered then add it(positive or negative) to existing balance<br />
double diffce = double.Parse(lblBalance.Text) + (double.Parse(lastEnteredAmount) - double.Parse(txtAmount.Text));<br />
lblBalance.Text = diffce.ToString();<br />
lastEnteredAmount = txtAmount.Text;


Please help! D'Oh! | :doh:

He who goes for revenge must first dig two graves.

AnswerRe: Problem with simple arithmetic using textbox and label! Pin
paas4-Jul-08 0:18
paas4-Jul-08 0:18 
QuestionFormatting of existing code......... Pin
KBM733-Jul-08 23:46
KBM733-Jul-08 23:46 
AnswerRe: Formatting of existing code......... Pin
leppie4-Jul-08 0:29
leppie4-Jul-08 0:29 
QuestionCreating application for multiple database connection Pin
xybroxymoron3-Jul-08 23:45
xybroxymoron3-Jul-08 23:45 
AnswerRe: Creating application for multiple database connection Pin
leppie4-Jul-08 0:30
leppie4-Jul-08 0:30 
JokeRe: Creating application for multiple database connection Pin
Harvey Saayman4-Jul-08 0:37
Harvey Saayman4-Jul-08 0:37 
QuestionInstall Pin
ellllllllie3-Jul-08 23:24
ellllllllie3-Jul-08 23:24 
AnswerRe: Install Pin
leppie4-Jul-08 0:32
leppie4-Jul-08 0:32 
AnswerRe: Install Pin
Michael90004-Jul-08 8:33
Michael90004-Jul-08 8:33 
Questionnetwork stream Pin
H.R3-Jul-08 22:59
H.R3-Jul-08 22:59 
AnswerRe: network stream Pin
leppie4-Jul-08 0:33
leppie4-Jul-08 0:33 
QuestionRe: network stream Pin
Harvey Saayman4-Jul-08 0:35
Harvey Saayman4-Jul-08 0:35 
QuestionBeginner: Need Advise Pin
HannahFoster3-Jul-08 22:41
HannahFoster3-Jul-08 22:41 
AnswerRe: Beginner: Need Advise [modified] Pin
Simon P Stevens4-Jul-08 3:51
Simon P Stevens4-Jul-08 3:51 
QuestionHow to create an activeX control by its classId? Pin
robin.zeng3-Jul-08 22:32
robin.zeng3-Jul-08 22:32 
AnswerRe: How to create an activeX control by its classId? Pin
leppie4-Jul-08 0:34
leppie4-Jul-08 0:34 
QuestionCrystal Report Pin
jonhbt3-Jul-08 20:34
jonhbt3-Jul-08 20:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.