12
Answers

specific cast is not valid in c# mvc

Photo of Mark Tabor

Mark Tabor

2y
839
1

I have a query 

var myquery=from nnn in db.Employees where nnn.empNo=EMPLOYEENO select nnn).FirstOrDefault();

EMPLOYEENO is parameter coming frm method, now in my Emplyees table there are few columns having null values so when this query executes it gives exception "SPECIFIC CAST IS NOT VALID" 

Answers (12)