I have a website with gridview populated from a SQL database.
I have put some code to confirm that the gridview is actually created by checking to see if any rows have been created.
If no rows have been created it displays a message box that informs the user that there are no records to display.
I am now struggling to see how I can get it to stop loading the page (which will be blank) and instead reload the previous page.
My idea is to perform a click on the btnBack button which has the URL information for the previous page already stored.
Unfortunately due being a bit thick I can't see how to perform the button click in code.
This is the code I currently have:
Any pointers would be gratefully received.