B
Big Dave
Good morning. I'm trying to register a client script block from a
server control. I've put the line of code to register it in the render
method, the onprerender event, I've overridden the pre-render method,
the controls init event, everything, but I still can't get it to work.
When I debug, I can step through to that line, but it's still not
outputting the javascript. Oh, and there is a form tag on the main
page. Any ideas on what else I can try to get this thing to work?
Just for an FYI, the custom control is added to a user control, then
that user control is added to a template user control, which is finally
added to the page.
Private Sub NavigationBlock_PreRender(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.PreRender
If Not Page.IsClientScriptBlockRegistered("navArray") Then
Page.RegisterClientScriptBlock("navArray",
Me._scriptArray.ToString)
End If
End Sub
Big Dave
server control. I've put the line of code to register it in the render
method, the onprerender event, I've overridden the pre-render method,
the controls init event, everything, but I still can't get it to work.
When I debug, I can step through to that line, but it's still not
outputting the javascript. Oh, and there is a form tag on the main
page. Any ideas on what else I can try to get this thing to work?
Just for an FYI, the custom control is added to a user control, then
that user control is added to a template user control, which is finally
added to the page.
Private Sub NavigationBlock_PreRender(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.PreRender
If Not Page.IsClientScriptBlockRegistered("navArray") Then
Page.RegisterClientScriptBlock("navArray",
Me._scriptArray.ToString)
End If
End Sub
Big Dave