try
if DirectCast(row.FindControl("Label1"), Textbox).Text is Nothing then
'Skip here
End If
Catch ex as exception
'It's Empty move to another control
end try
Hope this helps the idea is to check for a value before trying to use it.
try
if DirectCast(row.FindControl("Label1"), Textbox).Text is Nothing then
'Skip here
End If
Catch ex as exception
'It's Empty move to another control
end try
Hope this helps the idea is to check for a value before trying to use it.
I agree with Dave you need to process this on a background thread so the UI can update itself.