how can I retrieve values from a textBox in another screen after the user set / send it
In the first screen, I have a TextBox, mNombre50TextBox, the user fills in the number of tickets they want in the textBox.the sum is displayed (by calculating with jQuery) in another textBox, mTotal50TextBox, and the total bill is in 3th (another) textBox, ,mMontantTextBox...
In the second screen, I display the sum in a "Label", mPriceLabel,!
Here is my code in codebehind C#
object FormulairePageState = Session["FormulairePage"];
// change the amount by adding two 00
cost = s.MontantContribution;
double doubleVal = 0.0;
if (Double.TryParse(cost, out doubleVal))
newVal = (int)doubleVal * 100;
mPriceLabel.Text = newVal.ToString(); // 1000 is displayed, I need it for credit card
But in my label, mPriceLabel, there is nothing, it is empty. Comemnt I can display the sum in this screen ?
I did a test on my first screen: I removed "[ReadOnly="True"]" in my TextBox "mMontantTextBox"... Then I typed the numbers directly in the textBox, mMontantTextBox. In this case, these values are displayed in the label on the second screen!
Could you help me, please : Comemnt I can display the sum in 2sd screen ?
The question was for the OP. If you bothered to actually look at the code that was posted I can't find where the session variable is actually being set. But then you are obviously better and wiser than I. Please teach me.
Also, you should store the number of $50 and $100 tickets in the back end, and recalculate the price. If you read the price from postback, it is trivial to modify the post request so that you buy 3 $50 tickets for $2.
Need to wait until the DOS app has finished before going on with the next file.
System.Diagnostics.Process p = System.Diagnostics.Process.GetCurrentProcess();
but it seems to be waiting for my windows app to end, not the DOS app. I can see my DOS app running in a DOS window, and it closes when finished (it takes about a minute to run), but my app sits there in the while loop. I put a breakpoint at aaa = 5; and the app definitely sits in that loop.
I don't like it because it prefers Brushes.Transparent over Brushes.Black. Both brushes are equal. Here, if switch goes to the default case, then Brushes.Transparent would be used despite there isn't any reason to use it and not Brushes.Pink. The same with radius factors -- factor '1.2' isn't more special than '1'.
I rather agree – see my post where I used the default for a throw. When you're switching on an enum it's usual that you have defined behaviour for all cases and anything unexpected should throw an exception.
Sorry, but it's all bad.
1. First of all, it doesn't compile because neither NoteBeamPen nor Brushes.X are constant.
2. It is not clear what 'factors' RenderHead(drawingContext) are. I don't see why factor '1' should be 'more default' than, e.g. 0 or 10 or 1.5 or whatever.
3. Additionally, drawingContext.DrawEllipse is not actually redutant code. It can change to 'DrawGeometry' or other stuff in future, and then it would require refactoring if different geometry was used in these methods. And, using your solution refactoring wouldn't be straightforward.
4. You have replaced switch with ifs which doesn't actually change devilness.
Greetings - Jacek
modified on Tuesday, June 28, 2011 7:11 AM
Last Visit: 31-Dec-99 18:00 Last Update: 14-Aug-22 3:37