SpeedBWild
Programmer
I am trying to add a severside variable to the client script block. All of this code works except the <%=fileName%> variable is not passed in. Do I need to do something special?
Const SCRIPT_KEY As String = "PopUpWindow"
Const SCRIPT As String = "<script language=""javascript""> " + vbCr + _
"<!-- " + vbCr + _
"var features= 'scrollbars=yes,toolbars=no,status=yes,height=700,width=575,top=0'; " + vbCr + _
"window.open('ManageDetail.aspx?fileName=<%=fileName%>', 'Detail', features);" + vbCr + _
"// --> </script> "
If Not (Page.IsClientScriptBlockRegistered(SCRIPT_KEY)) Then
Page.RegisterClientScriptBlock(SCRIPT_KEY, SCRIPT)
End If
Const SCRIPT_KEY As String = "PopUpWindow"
Const SCRIPT As String = "<script language=""javascript""> " + vbCr + _
"<!-- " + vbCr + _
"var features= 'scrollbars=yes,toolbars=no,status=yes,height=700,width=575,top=0'; " + vbCr + _
"window.open('ManageDetail.aspx?fileName=<%=fileName%>', 'Detail', features);" + vbCr + _
"// --> </script> "
If Not (Page.IsClientScriptBlockRegistered(SCRIPT_KEY)) Then
Page.RegisterClientScriptBlock(SCRIPT_KEY, SCRIPT)
End If