I have been trying to wrap my head around a small issue I have. I'm trying to show a messagebox if a value a met.

if (CurrentProcess == "Test")
        //Show message then do something else
        //Do Something else

JScript confirm will work with onclientClick but that is everytime the client button is clicked I only want is to show if a something is met.

I have been useing my best friend "Google" but could not find a solution to my problem.

Any Idees?

Include the following line in the Namespace group

using System.Windows.Forms;

The include the following code in the button click event

System.Windows.Forms.MessageBox.Show("Your Message Here!");

Hope this works..

Vishal Ranjan

In your case dont include it into any event just paste it where u want to show message...

That is a windows forms method, will this not stop server for all other users?

That is what I want to do. Something like JScript Confirm or Alert, but inside a method not onclient click event.

Try this:

MessageBox.Show("Your Text");

Use the namespace System.Windows.Forms;

commented: Windows form is ASP! -1

Refer this link

Alternatively, You can use the following:

Response.Write("<script language='javascript'>alert('Thank You');</script>");