views:

50

answers:

4

Hi can some body help me how to call process.existed() method in c#?

Actually i registered that method in page load it self only but it is not getting fired may i know the reason?

myprocess.Exited += new EventHandler(myprocess_Exited);

void myprocess_Exited(object sender, EventArgs e)
    {
        lblmsg.Visible = true;
        lblmsg.Text = "Process end...";
    }

Thank you, Nagu

+2  A: 

My guess is that you haven't set

myprocess.EnableRaisingEvents = true;

(See the documentation for more details.)

Jon Skeet
A: 

Thank you it is working fine

Nagu
@Nagu: it's better to mark the correct answer as accepted (using the check mark next to it); then it shows in the question list that there is an accepted answer to the question.
Fredrik Mörk
A: 

Are you doing that in asp.net?

Jon: Is it OK to do such a thing in asp.net?

shahkalpesh
A: 

Yes it is possible

Nagu