Presently I am working on a Project. We developed our application in ASP.NET 2.0 without AJAX. Later on at the time of testing we found that there are lots of postbacks in a page to validate the data entered by the user. So we have to implement AJAX in the current application to reduce the full page postbacks with partial page postbacks.
We used ScriptManager and UpdatePanel controls on the pages along with changes in the web.config for AJAX to work. Use of UpdatePanel helped the application to reduce the complete page postbacks with partial page postbacks.
Public Sub rkShowAJAXMessageBox(ByVal msg As String)
Dim rkMsg As String = String.Format("alert('" & msg & "')")
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "rkMsg", rkMsg, True)
So for example, in your code behind file, you created the above procedure and just give a call to this procedure with a Message String as parameter to show:
rkShowAJAXMessageBox("Invalid User ID/Password")
Here come the desired results of showing MessageBox to the user, just by calling rkShowAJAXMessageBox method in the code behind file when you .aspx page is using the update panels.