Feb 13, 2014, 9:25 AM
[OPEN] [#432] RegisterGlobalScript and MVC/ASPX Web Forms not working
Hello,
I am trying to download a JS and a CSS on demand using the "MvcResourceManager.RegisterGlobalScript" method on my partial view.
Partial view:
All this stuff works on Razor views (for instance on your demo at this address:
http://mvc.ext.net/#/Dynamic_Partial_Rendering/Add_Tab/
However, while the RegisterGlobalScript call is success it's not firing the correct javascript basically ignoring the request.
Could you help us giving us any workaround or solution to this issue?
Thanks a lot,
I am trying to download a JS and a CSS on demand using the "MvcResourceManager.RegisterGlobalScript" method on my partial view.
Partial view:
<%@ Control Language="VB" Inherits="System.Web.Mvc.ViewUserControl" %>
<script runat="server">
Protected Sub Page_Load(sender As Object, e As EventArgs)
ResourceManager.RegisterGlobalScript("~/MyScript.js")
End Sub
</script>
<ext:Panel runat="server" Title="MyPartial 2 Panel">
<Content>
CONTENT HERE <%=Now %>
</Content>
</ext:Panel>
This is the code used when calling the action:Function MyPartial2(containerId As String) As ActionResult
Dim result As New PartialViewResult With {
.ContainerId = containerId,
.RenderMode = Ext.Net.RenderMode.AddTo
}
Return result
End Function
... the action is called using DirectEvent on the primary page:<ext:Button runat="server" Icon="Add" Flat="true">
<DirectEvents>
<Click Url="~/Portal/MyPartial2">
<ExtraParams>
<ext:Parameter Name="containerId" Value="#{TabContainer}" />
</ExtraParams>
</Click>
</DirectEvents>
</ext:Button>
All this stuff works on Razor views (for instance on your demo at this address:
http://mvc.ext.net/#/Dynamic_Partial_Rendering/Add_Tab/
However, while the RegisterGlobalScript call is success it's not firing the correct javascript basically ignoring the request.
Could you help us giving us any workaround or solution to this issue?
Thanks a lot,
Last edited by Daniil; Feb 14, 2014 at 4:38 PM.
Reason: [OPEN] [#432]