Kayıtlar

Mart 18, 2015 tarihine ait yayınlar gösteriliyor

mvc'de belirli süre içinde fonksiyon çağırmak

The answer to this question would very much depend on what do you mean by reload some info in ASP.NET MVC project . This is not a clearly stated problem and as such, more than obviously, it cannot have a clearly stated answer. So if we assume that by this you want to periodically poll some controller action and update information on a view you could use the setInterval javascript function to periodically poll the server by sending an AJAX request and update the UI: window . setInterval ( function () { // Send an AJAX request every 5s to poll for changes and update the UI // example with jquery: $ . get ( '/foo' , function ( result ) { // TODO: use the results returned from your controller action // to update the UI }); }, 5000 ); If on the other hand you mean executing some task on the server at regular periods you could use the RegisterWaitForSingleObject method like this: var waitHandle = new AutoResetEvent ( false