Quantcast
Channel: AjaxControlToolkit Work Item Rss Feed
Viewing all articles
Browse latest Browse all 4356

Commented Unassigned: clientScript.RegisterClientScriptBlock not firing from within listView ItemCommand [27788]

$
0
0
Using new AJAX Control Toolkit 15.1.
I've replaced the AJAXControlToolkit:ToolscriptScriptManager with asp:scriptManager on my page (contained within a master page that does not have a script manager)

Now when I try to use clientScript.RegisterClientScriptBlock to run some javascript from within listView ItemCommand, it does not fire. example below.

Suggestions?


Dim go As String = String.Empty

If e.CommandName = "button1" OrElse condition2 = 1 Then
go = "<script type='text/javascript'>window.open('page1.aspx" & pageQueryString & "', '_blank')</script>"
Else
go = "<script type='text/javascript'>window.open('page2.aspx" & pageQueryString & "', '_blank')</script>"
End If

clientScript.RegisterClientScriptBlock(clientScriptType, "buttonClickScript", go)
Comments: Could you clarify, are you using the standard ASP.NET ListView? So, in other words, the problem is that after switching to the standard ScriptManager, the ListView fails to register a client script via the RegisterClientScriptBlock method? Maybe you have not removed the previous Toolkit version? Otherwise it seems to not be the fault of the Ajax Control Toolkit. Please check [this guide](https://ajaxcontroltoolkit.codeplex.com/wikipage?title=Upgrade%20your%20project%20to%20AjaxControlToolkit%20v15.1) (step 0).

Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>