|
 |
aspx thread: Re: Datatypes
Message #1 by Sam Clohesy <sam@e...> on Wed, 29 May 2002 17:29:22 +0100
|
|
I have an application built in beta version of asp.net- I am having probs
with some sections (notably around rules for data types) for example:
Dim UserId As String = User.Identity.Name
throws up:
Exception Details: System.FormatException: Input string was not in a correct
format.
Any suggestions- do I need to:
Int32.Parse(User.Identity.Name))??
Any help much appreciated
Thanks
Sam
Message #2 by Feduke Cntr Charles R <FedukeCR@m...> on Wed, 29 May 2002 12:39:44 -0400
|
|
Sam,
The line
Dim UserId As String = User.Identity.Name
is throwing an exception? Positive its that line? Try something like this:
Dim UserId As String = User.Identity.Name.ToString()
however I can't imagine a String is throwing a FormatException unless
User.Identity.Name isn't a string.
- Chuck
-----Original Message-----
From: Sam Clohesy [mailto:sam@e...]
Sent: Wednesday, May 29, 2002 12:29 PM
To: ASP+
Subject: [aspx] Re: Datatypes
I have an application built in beta version of asp.net- I am having probs
with some sections (notably around rules for data types) for example:
Dim UserId As String = User.Identity.Name
throws up:
Exception Details: System.FormatException: Input string was not in a correct
format.
Any suggestions- do I need to:
Int32.Parse(User.Identity.Name))??
Any help much appreciated
Thanks
Sam
Message #3 by Sam Clohesy <sam@e...> on Wed, 29 May 2002 17:50:59 +0100
|
|
Hi Chuck- I think you are right- I think that UserID is not a string..I will
keep looking- thanks Chuck
Sam
-----Original Message-----
From: Feduke Cntr Charles R [mailto:FedukeCR@m...]
Sent: 29 May 2002 17:40
To: ASP+
Subject: [aspx] Re: Datatypes
Sam,
The line
Dim UserId As String = User.Identity.Name
is throwing an exception? Positive its that line? Try something like this:
Dim UserId As String = User.Identity.Name.ToString()
however I can't imagine a String is throwing a FormatException unless
User.Identity.Name isn't a string.
- Chuck
-----Original Message-----
From: Sam Clohesy [mailto:sam@e...]
Sent: Wednesday, May 29, 2002 12:29 PM
To: ASP+
Subject: [aspx] Re: Datatypes
I have an application built in beta version of asp.net- I am having probs
with some sections (notably around rules for data types) for example:
Dim UserId As String = User.Identity.Name
throws up:
Exception Details: System.FormatException: Input string was not in a correct
format.
Any suggestions- do I need to:
Int32.Parse(User.Identity.Name))??
Any help much appreciated
Thanks
Sam
Message #4 by "Minh T. Nguyen" <nguyentriminh@y...> on Wed, 29 May 2002 10:43:32 -0700
|
|
Sam,
It's a known bug that VS.NET in debug mode breaks on the line
right after the line that causes the original exception. Maybe the
exception occured on the line before that.
Minh.
-----Original Message-----
From: Sam Clohesy [mailto:sam@e...]
Sent: Wednesday, May 29, 2002 9:51 AM
To: ASP+
Subject: [aspx] Re: Datatypes
Hi Chuck- I think you are right- I think that UserID is not a string..I
will
keep looking- thanks Chuck
Sam
-----Original Message-----
From: Feduke Cntr Charles R [mailto:FedukeCR@m...]
Sent: 29 May 2002 17:40
To: ASP+
Subject: [aspx] Re: Datatypes
Sam,
The line
Dim UserId As String = User.Identity.Name
is throwing an exception? Positive its that line? Try something like
this:
Dim UserId As String = User.Identity.Name.ToString()
however I can't imagine a String is throwing a FormatException unless
User.Identity.Name isn't a string.
- Chuck
-----Original Message-----
From: Sam Clohesy [mailto:sam@e...]
Sent: Wednesday, May 29, 2002 12:29 PM
To: ASP+
Subject: [aspx] Re: Datatypes
I have an application built in beta version of asp.net- I am having
probs
with some sections (notably around rules for data types) for example:
Dim UserId As String = User.Identity.Name
throws up:
Exception Details: System.FormatException: Input string was not in a
correct
format.
Any suggestions- do I need to:
Int32.Parse(User.Identity.Name))??
Any help much appreciated
Thanks
Sam
|
|
 |