1
Answer

How to get the error message when using HtmlInputFile in C# and .NET?

Wen Dell

Wen Dell

17y
2.3k
1


Hi, everyone, Thank in advance!

Now I use the Control "HtmlInputFile"  ,  C# and .NET to design a webpage for uploading the file. When the length of the filename(with its path) of the selected file  is more than 255, the textbox part of the HtmlInputFile is blank. As for the situation, I hope a error message is given. I have tried to write some codes in the Global.aspx.cs. But I failed.

For Example:

C:\Documents and Settings\wjf\111\11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111.doc

How can I do?

Answers (1)