TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Robson Amaral
NA
132
17.3k
Message log error for user
Apr 12 2018 12:45 PM
When compiling my web application, it returns me the following message log:
The CPF / CNPJ reported in cell H referring to row 1 is in an incorrect format. Please correct the spreadsheet.
The CPF / CNPJ reported in cell H referring to row 1 is in an incorrect format. Please correct the spreadsheet.
The CPF / CNPJ reported in cell H referring to row 1 is in an incorrect format. Please correct the spreadsheet.
The CPF / CNPJ reported in cell H referring to row 1 is in an incorrect format. Please correct the spreadsheet.
However, it is not loading the message sequentially, the correct one was to show the following message:
The CPF / CNPJ reported in cell H referring to row 1 is in an incorrect format. Please correct the spreadsheet.
The CPF / CNPJ reported in cell H referring to row 2 is in an incorrect format. Please correct the spreadsheet.
The CPF / CNPJ reported in cell H referring to row 3 is in an incorrect format. Please correct the spreadsheet.
How can I remedy this situation?
Here's my code:
private
Interested setInterested o(DataRow line)
{
if
(!line.ItemArray[12].ToString().Equals(
""
))
interested .Cep = line.ItemArray[12].ToString();
if
(!line.ItemArray[7].ToString().Equals(
""
))
if
(line.ItemArray[7].ToString().Length == 14)
{
interested .CPF_CNPJ = HelpCPF_CNPJ.DeformationCPF(line.ItemArray[7].ToString());
interested.Tipo = 1;
}
else
if
(line.ItemArray[7].ToString().Length == 18)
{
interested.CPF_CNPJ = HelpCPF_CNPJ.DeformationCNPJ(line.ItemArray[7].ToString());
interested.Tipo = 2;
}
else
{
int
i = 0;
i = i + 1;
//use to receive the next line
log.Append(
"The CPF / CNPJ informed in cell H referring to the line "
+ (i) +
"is in an incorrect format. Please correct the spreadsheet. <br>"
);
fileInvalidated =
true
;
}
return
interested;
}
}
Reply
Answers (
0
)
Compilation does not pass the message log line to the user
MVC 5 C# .NET 2017