Stack Trace in error in Webpage in ASP not in my code?
I'm new to web-development in ASP, and I'm experiencing a problem where I try to access a certain page through a link and I get an error, the first part says it's an exception, then tips on debugging and then the stacktrace.
What happens is that this code isn't on my app开发者_运维百科lication, I've had errors like this before, and the peace of code that appeared usually helped me a lot.
--[EDIT 1]--
for Dave Anderson:Format(Eval("Data"),"dd/MM/yyyy")
(inside a label)
The first two lines of the stack trace should give you some hint. The 2nd line shows that an instance of the ASP.PMUsControl is attempting to bind to some set of data with a format being applied to a string value on the 1st line. That Expression is not valid which I suppose is because it can't be formatted and I would say that's because the string is null or the object can't be converted to a string. Can you find the data it is trying to bind to?
EDIT: That format string "dd/MM/yyyy"
is for use with a Date object so I don't think Eval("Data")
can be returning a valid Date to format. Try removing the Format function and just leave Eval("Data")
and if the page loads you'll get to see what it tried to use as a date. For background see Date & Time Format Strings
精彩评论