reference and cast error

  • Thread starter Thread starter Vikram
  • Start date Start date
V

Vikram

in my asp.net app, i get following two errors some times, these errors
occasionally occurs

please let me know if anyone has any idea why they occur

Cast from string "" to type 'Integer' is not valid

Object reference not set to an instance of an object
 
What integer value do you think an empty string represents? Dotnet can't
decide it for you. You need to check the string on empty before casting it
to integer.

The object reference error means the variable you use is null. Check your
code, likely you need to create it.

Eliyahu
 
No but same code works fine everytime, only some time it gives error and
user has to relogin ino the app. Is this due to session expiry or viewstate
curruption?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top