I started with a webpage with the vb.net code behind where I passed an array of variables to Javascript through clientscript.registerclientscriptblock. I decided to add an update panel and had hoped to simply register the clientscriptblock on the Scriptmanager. The array of javascript variables needs to be available to the update panel. The tablenames variable is initialized in javascript. I went from this:
Dim zzz As Integer = 0
Dim myJavaScript As StringBuilder = New StringBuilder()
myJavaScript.Append("<script language='Javascript'>")
Do Until zzz = n
'push the ids to javascript array
myJavaScript.Append(vbCrLf)
myJavaScript.Append("tablenames.push('" & processid(zzz) & "');")
zzz = zzz + 1
Loop
myJavaScript.Append("</script")
ClientScript.RegisterClientScriptBlock(Me.GetType(), "clientscript", myJavaScript.ToString())
to this:
Dim zzz As Integer = 0
Dim myJavaScript As StringBuilder = New StringBuilder()
myJavaScript.Append("<script language='Javascript'>")
Do Until zzz = n
'push the ids to javascript array
myJavaScript.Append(vbCrLf)
myJavaScript.Append("tablenames.push('" & processid(zzz) & "');")
zzz = zzz + 1
Loop
myJavaScript.Append("</script")
ScriptManager.RegisterClientScriptBlock(Me.UpdatePanel1, Me.UpdatePanel1.GetType(), "clientscript", myJavaScript.ToString(), False)
Now I am getting three different errors in the console of firebug.
ASP.NET Ajax client-side framework failed to load.
ReferenceError: Type is not defined Type._registerScript("MicrosoftAjaxWebForms.js", [
ReferenceError: Sys is not defined
Previously I had no errors in the console. I have another update panel running perfectly in this vb.net solution on another page. But this page is just not working. I have been all over the internet today and have found nothing which solves this problem.
Can ANYONE help?