The UpdatePanel along with the UpdateProgress control seemed to be the perfect solution. Both work just like a standard panel control that holds other web controls like a container.
These extensions are really slick, but I ran into a few issues with Response.Write.
My code has a routine that spawns an java alert box to display any errors messages. This is pretty standard code and will display a small popup window to output your message. This is pretty much a standard way of displaying a quick message to the user. Nothing very special about this, except that it doesn't work with the new Ajax extensions.
1: Protected Sub PopErrorWindow(ByVal ErrMsg As String)
2:
3: Response.Write("<script language='javascript'>window.alert('" & ErrMsg & "');</script>")
4:
5: End Sub
After embedding my controls within the update panel, I started getting the following error from the Response.Write in the code above. It seems that Ajax doesn't like the partial postback that I was doing.
I talked it over with a co-worker and after a bit of Internet searching and experimenting around with code, I was able to come up with the following code as a solution. Seems to work fine and I haven't found any other side effects.
3: ScriptManager.RegisterClientScriptBlock(Me.UpdatePanel1, Me.GetType, "Alert", "alert('" + ErrMsg + "')", True)
I hope this helps anyone else out there having a similar problem.
Remember Me
Page rendered at Wednesday, December 03, 2008 10:14:01 PM (Eastern Standard Time, UTC-05:00)
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.