T
tshad
I have a field that I read from my database that is a bit field field into a
textbox.
The Trace on the variable (MyInfoCreated) shows it as "False" - as you can
see from the error.
I tried it with:
if not MyinfoCreated then
as well as what is shown here
if (MyInfoCreated.Text <> 1) then
The first says it Cast from "False" to Long is invalid and the second says
the Cast from "False to Double is invalid.
If I do:
If MyInfoCreated.Text then
This works fine.
The error I get is:
********************************************************************
Input string was not in a correct format.
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.
Exception Details: System.FormatException: Input string was not in a correct
format.
Source Error:
Line 219: else
Line 220:trace.warn("MyInfoCreated.Text = " & MyInfoCreated.Text)
Line 221: if (MyInfoCreated.Text <> 1) then
Line 222:s.close()
Line 223: response.Redirect("secure/MyInformation.aspx")
Source File: C:\Inetpub\wwwroot\staffingworkshop\applicant\EELogin.aspx
Line: 221
Stack Trace:
[FormatException: Input string was not in a correct format.]
Microsoft.VisualBasic.CompilerServices.DoubleType.Parse(String Value,
NumberFormatInfo NumberFormat) +195
Microsoft.VisualBasic.CompilerServices.DoubleType.FromString(String
Value, NumberFormatInfo NumberFormat) +82
[InvalidCastException: Cast from string "False" to type 'Double' is not
valid.]
Microsoft.VisualBasic.CompilerServices.DoubleType.FromString(String
Value, NumberFormatInfo NumberFormat) +171
Microsoft.VisualBasic.CompilerServices.DoubleType.FromString(String
Value) +7
ASP.EELogin_aspx.Login() in
C:\Inetpub\wwwroot\staffingworkshop\applicant\EELogin.aspx:221
****************************************************************************************
Thanks,
Tom
textbox.
The Trace on the variable (MyInfoCreated) shows it as "False" - as you can
see from the error.
I tried it with:
if not MyinfoCreated then
as well as what is shown here
if (MyInfoCreated.Text <> 1) then
The first says it Cast from "False" to Long is invalid and the second says
the Cast from "False to Double is invalid.
If I do:
If MyInfoCreated.Text then
This works fine.
The error I get is:
********************************************************************
Input string was not in a correct format.
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.
Exception Details: System.FormatException: Input string was not in a correct
format.
Source Error:
Line 219: else
Line 220:trace.warn("MyInfoCreated.Text = " & MyInfoCreated.Text)
Line 221: if (MyInfoCreated.Text <> 1) then
Line 222:s.close()
Line 223: response.Redirect("secure/MyInformation.aspx")
Source File: C:\Inetpub\wwwroot\staffingworkshop\applicant\EELogin.aspx
Line: 221
Stack Trace:
[FormatException: Input string was not in a correct format.]
Microsoft.VisualBasic.CompilerServices.DoubleType.Parse(String Value,
NumberFormatInfo NumberFormat) +195
Microsoft.VisualBasic.CompilerServices.DoubleType.FromString(String
Value, NumberFormatInfo NumberFormat) +82
[InvalidCastException: Cast from string "False" to type 'Double' is not
valid.]
Microsoft.VisualBasic.CompilerServices.DoubleType.FromString(String
Value, NumberFormatInfo NumberFormat) +171
Microsoft.VisualBasic.CompilerServices.DoubleType.FromString(String
Value) +7
ASP.EELogin_aspx.Login() in
C:\Inetpub\wwwroot\staffingworkshop\applicant\EELogin.aspx:221
****************************************************************************************
Thanks,
Tom