Only the language being used is C#, the framework that you are using is ASP.NET Web Forms. So, consider looking for an answer in ASP.NET Web Forms framework, not C#. In C# there are many ways to show a dialog,
// .NET
new MessageBox("Hello").Show();
// Windows Runtime
new MessageDialog("Hello").ShowAsync();
// etc
The one you are looking for is ASP.NET based, which is for sure, alert('hello'). The thing is that you are sending the alert box to the client, do not do this. Alerts must be shown once the page has been loaded, in case if there is an error. Do not show a popup as soon as the page loads. Try this: 1. Send an ajax request to the web page, to find the files. 2. Send a response, if that response fails - Show the alert box. This way you will implement what you want, it would allow you to use plain-JavaScript to do this.
The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~