由于某些原因,我的RegisterClientScriptBlock无法启动
我在vb.net上的代码
Private Sub Update_Chart(ByRef Table As DataSet)
(more code but not needed, such as arrays)
Dim script As String
script = _
"function chart()" & _
"{" & _
"var chart = $('#container1').highcharts();" & _
"chart.redraw();" & _
" }" & _
";"
ScriptManager.RegisterClientScriptBlock( _
Me, _
GetType(Page), _
"container1", _
script, _
True)你知道为什么吗?
发布于 2013-07-09 22:45:04
您的代码只是简单地定义了一个javascript函数。函数只有在被调用后才会执行。试着这样做:
Dim script As String
script = "chart.redraw();"
ScriptManager.RegisterClientScriptBlock( _
Me, _
GetType(Page), _
"container1", _
script, _
True)https://stackoverflow.com/questions/17550975
复制相似问题