I want a simple MessageBox for ASP.Net, but everything I tried didn\'t work and I don\'t know why. The last thing I tried was this but it didn\'t work either.
Any id
Is this using ajax? Is this attached to a server side event that's called when the user clicks a button?
If so, ajax only sends data that's associated with the updatepanel in question. If so, try this ScriptManager.RegisterStartupScript((Control)ctlControl, ctlControl.GetType(), "ClientScript", "alert('foo')", true); It is important that the ctlControl is inside the updatepanel being updated.
If you are not using ajax, is ClientScript registered elsewhere with RegisterClientScriptBlock? The client name has to be unique for every registry or it will think you are calling the same code twice.