ASP.NET clear label after clicking on submit button
I have a form that exports data to excel when clicking on the submit button. I obtain data from a SPROC in a database and dump the data to a DataTable. If the dt.rows.count > 0 then I continue to export otherwise I set a label on the page ("lblMsg") to indicate no records were found.
I intentionally make it fail by looking for data I know does not exist. The message displays correctly. However, when I make it look for data that does not exist lblMsg does not remove the Message even though I have stuck lblMsg.Text = "" all over the place.
Any ideas how to resolve?
8/22/2022 - Mon
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!