where to look for the error

G

Guoqi Zheng

On traditional ASP, when there is an error, I can always get an detail error
description and where (which line) the error is.

I am using VS.NET to develope ASP.NET application. I often got some errors
like "Specified cast is not valid." But how can I find out which line the
error is?

--
Kind regards


Guoqi Zheng
guoqi AT meetholland dot com
Http://www.meetholland.com
 
K

Karl

Compile your code in DEBUG mode, make sure you're web.config's <compilation
element has the debug="true" element.

Karl
 
A

Alan Ferrandiz [MCT]

In addition to verify that your project is working in debug mode, i find it a very good practice to enable line numbers in the Visual Studio .NET IDE, since it will tell you the line the runtime error ocurred. To enable line numbers go to Tools / Options / Text Editor / Basic (I'm working witrh VB.NET, there is an options folder for every language), and check the Line Numbers option.

Hope This helps

Alan Ferrandiz [MCT]
geekswithblogs.com/aferrandiz
 

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

Members online

Forum statistics

Threads
473,778
Messages
2,569,605
Members
45,237
Latest member
AvivMNS

Latest Threads

Top