Hi,
Sometimes when I set the value of a HtmlInputFile the value isn't set and after the set timeout a TimeoutException is thrown. In order to give the upload enough ime I have to set the timeout to 2 minues, so the TimeoutException is thrown after 2 minutes even if the value wasn´t set.
Is there any way to check if the value was set before the timeout is over? Two minutes are a long time for a not working test.
That´s my current code:
Thanks
Kind regards
Sometimes when I set the value of a HtmlInputFile the value isn't set and after the set timeout a TimeoutException is thrown. In order to give the upload enough ime I have to set the timeout to 2 minues, so the TimeoutException is thrown after 2 minutes even if the value wasn´t set.
Is there any way to check if the value was set before the timeout is over? Two minutes are a long time for a not working test.
That´s my current code:
while
(
string
.IsNullOrEmpty(uploadField.Value)
{
try
{
uploadField.Upload(path, 120000);
}
catch
(TimeoutException) { Thread.Sleep(1000); }
}
Thanks
Kind regards