views:

51

answers:

1

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 application, 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)

+3  A: 

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

Dave Anderson
Thank you, and please, keep on helping. The only 'format" found through searching in the PMUcontrol is now added to the question (check [edit 1])
MarceloRamires
That's EXACTLY IT. One date is comming as nothing. Thank you so much! Well.. the problem is, I just can't let it in the american pattern (as much as I want.. I live in Brazil) Then I'll have to check if it's not null.. Thanks Again!
MarceloRamires
Is there a quick way to do that inside a text property in a label ? like a one line "if exists, format" ?
MarceloRamires