English 中文(简体)
使用非同步 ajax 或 jquery 完全重新装入页面
原标题:fully reload a page using asynchronous ajax or jquery

我有一个 ASP.net 网页, 访客在其中执行的任务, 将在运行时生成 JavaScript, 登记在页面上, 以下 ASP.net 功能用于登记 JS 代码 :

Page.ClientScript.RegisterHiddenField
Page.ClientScript.RegisterStartupScript
Page.ClientScript.RegisterClientScriptBlock

生成的代码非常难以维护,该页面完全载于ASP.net ajax和JS,

And a refresh button is there to reload the page or to clear everything (just like you press F5) is there any silent way to reload the whole page? (asynchronous reload, without page flicker (Ajax))

问题回答

What do you mean with "silent way"? You can refresh the whole page using

location.reload();

请使用 place.reload. reload( true); 从服务器上重新装入整个页面。 如果您想要从缓存中重新装入, 请使用 false 。 使用 ajax u 可以使用空 url 和上下文作为 文件 。 body 来重新装入整页 。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!