| Purchase | |
| Sales | |
| Return | |
| Balance | |
in my TextBox4_TextChanged it throw error as
Server Error in '/retrievedata' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.Compiler Error Message: CS0103: The name 'c' does not exist in the current context
Source Error:
|
Source File: d:\sample tools\retrievedata\Default.aspx.cs Line: 87
i need in the balnce field as output as 5.in the textbox

Lakshmanan Sethu SankaranarayanPosted Apr 29, 2014, 4:34 AM
Please try this
else if (int.Parse(TextBox3.Text)!= 0)
{
int c = int.Parse(TextBox3.Text) + int.Parse(TextBox4.Text);
TextBox3.Text = Convert.ToString(c);
}
Lakshmanan Sethu SankaranarayanPosted Apr 29, 2014, 4:32 AM
selvi subramanianPosted Apr 29, 2014, 4:29 AM
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.this also show this error
Input string was not in a correct format.
Exception Details: System.FormatException: Input string was not in a correct format.
Source Error:
Line 59: //Label1.Text = "balance is nill"; Line 60: } Line 61: else if (int.Parse(TextBox3.Text) != 0) Line 62: { Line 63: int c = int.Parse(TextBox3.Text) + int.Parse(TextBox4.Text);Source File: d:\sample tools\retrievedata\Default.aspx.cs Line: 61
Stack Trace:
Version Information: Microsoft .NET Framework Version:2.0.50727.4984; ASP.NET Version:2.0.50727.4971
Lakshmanan Sethu SankaranarayanPosted Apr 29, 2014, 4:25 AM
Use the following code
else if (int.Parse(TextBox3.Text)!= 0)
{
int c = int.Parse(TextBox3.Text) + int.Parse(TextBox4.Text);
TextBox3.Text = Convert.ToString(c);
}
selvi subramanianPosted Apr 29, 2014, 3:58 AM
Lakshmanan Sethu SankaranarayanPosted Apr 29, 2014, 3:51 AM