Nov 24, 2010, 1:22 PM
[CLOSED] RegisterOnReadyScript in MVC partial view
Hi, I'm trying to register an on-ready script in my MVC partial view but it won't fire. When I register an on-ready script from a view page, it works fine.
This is how I register the script from within the partial view:
I have attached a sample project. It is supposed to show an alert that states 'child document ready' but that doesn't happen.
This is how I register the script from within the partial view:
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
ResourceManagerProxy.ResourceManager.RegisterOnReadyScript("alert('child document ready');");
}
</script>
<ext:ResourceManagerProxy ID="ResourceManagerProxy" runat="server" />
Here's how I render the partial view from my main view page: <%= Html.RenderExtPartial("ViewUserControl1") %>
The same technique is used in the Ext.Net.MVC demo but in that case it is used from within an auto loading window, not a partial view that is loaded using Html.RenderExtPartial.I have attached a sample project. It is supposed to show an alert that states 'child document ready' but that doesn't happen.
Last edited by Daniil; Jan 20, 2011 at 9:49 AM.
Reason: [CLOSED]