ScriptManager.RegisterClientScriptBlock not working
As you can see in my function below, I did use ClientScript.RegisterClientScriptBlock and it worked fine.
I have now added an update panel to one of my pages so need this javascript alret function to work in there so have created an ajax version.
What do I need to do to:
ScriptManager.RegisterClientScriptBlock(Me.Page, Me.GetType, "DisplayAlertaj", script, True)
As it isn't currently doing anything?
Thanks in advance
Public Sub JavascriptAlertAjax(ByVal message As String) Try Dim script = "<script language='JavaScript'> " script += "DisplayAlert('" & message & "')" script += "</script>" 'ClientScript.RegisterClientScriptBlock(Me.GetType, "DisplayAlert", script) ScriptManager.RegisterClientScriptBlock(Me.Page, Me.GetType, "DisplayAlertaj", script, True) Catch ex As Exception Throw End Try End Sub
This could help you
Raj