Aug 29, 2018 09:59 AM|Ackerly Xu|LINK
I'm a little confused by your code you have posted.
Let's assume that your code doesn't meet an exception. The is to say the code will either run the if block or else block.
Although you write lblValidate.Text = "" at the beginning of the click event ,you write code lblValidate.Text = "An export was not created!" in your if block.
In you else block , you write Response.Redirect("Doc.aspx") ,that is to say , if the user still stay at the page , your code in if block must have run and the text is set to "An export was not created!". That is why although you don't meet an exception
, the text is still not empty.