I have some code that inserts data into a table. There is an error that occurs and I want to show the error to the user. All my SQL code is in seprates classes and the return of the function is a boolean.
In my code behind I normally show a error like this.
strmessage = "Failed to update the Printer list. " & Session("error")
ScriptManager.RegisterClientScriptBlock(Me.Page, GetType(Page), "clientScript", "alert('" & strmessage & "')", True)
I have palced the error message into a Session variable that I then append to the strmessage variable as shown above. The issue I have is that when I run the code the error occurs but the messagebox never shows. The only thing I can figure is that either there is a character in the strmessage that screws up the scriptmanager or the error message is too long.
Here is the message that should show in the message ...
Go to the complete details ...