Partial PostBack without AJAX

539 Views Asked by At

I want to silently check for Session existence without Posting back page by using AJAX Timer and AsyncPostBack Trigger.

Now, I would like to know is there anyway to silently check whether ASP.NET C# if (Session["email"] = null) { Response.Redirect("Logout.aspx"); } something of this kind to check for every 10 seconds without Posting Back Page and without using AJAX by using something like jQuery or any other technology that is supported by .NET?

2

There are 2 best solutions below

0
On BEST ANSWER

The server can push to a loaded page if you use an asynchronous controller with a partial view which is loading every set amount of time.

http://msdn.microsoft.com/en-us/library/ee728598.aspx

0
On

there is only one way to get to the server. send a request. that can be a "standard" request where the browser will refresh the screen when a response is sent. the other type of request is a ajax request. the difference is an ajax request contains a header to inform the server it's an ajax request. when the browser receives the response it will allow the developer to decide what to do with the response. either way a full request/response exchange takes place the only difference is how the browser handles the request.

jquery is a javascript library that includes functionality to make ajax request easier to setup.

to answer you question no, there is no way around making a request.