in my ASp.NET Form, This is the part of my code
ScriptManager.RegisterStartupScript(UpdatePanel1, UpdatePanel1.GetType(), "ActionField", "ActionField();", true);
UpdatePanel1.Update();
.......
Page.Response.Redirect(@"~/DownloadFile.ashx", false);
So becuase of the Page.Response.Redirect , the ScriptManager.RegisterStartupScript never run, becuase of the life cycle of the page, how can I force ScriptManager.RegisterStartupScript run the javasacript on the Frontend page and after that the response.redirect executed?
5
if i understand well you call the page with Page.Redirect.
When page is loaded you would to use ActionField method..
With jquery..
<script>
$( document ).ready(function() {
ActionField();
});
</script>
The actionfield will called after page is completely loaded..
1