I have a page that the user wants to see a success, failure message on a save. I do the save routine to the database, and set the blnReturn to whether it works or not. I was using the code below to write out the alert and it was working beautifully....until I turned smart navigation on for the project. Now I get script errors on the page. When I turn off smart navigation, it works again. The requirements are to use smart navigation, and use a alert to tell the user the status of the save. I am not fully up to speed on the javascript scene, so I could use some help in understanding this problem, and a good work around/ better solution.

VB Code:
  1. If blnReturn Then
  2.             'Show a saved message.
  3.             Response.Write("<script>alert ('Data Saved.')</script>")
  4.         Else
  5.             'Show an error message.
  6.             Response.Write("<script>alert ('ERROR! There was an error saving the data.')</script>")
  7.         End If

Smart navigation in the Web.Config:
Code:
<configuration>
  <system.web>
	<!--	SMART NAVIGATION
			This is for smart navigation in the web application.-->
	<pages smartNavigation="true" />
  </system.web>
</configuration>