Is it possible to prevent a browser from caching an ASPX page?

Just call SetNoStore on the HttpCachePolicy object exposed through the Response object’s Cache property, as demonstrated here: <%@ Page Language=”C#” %> <html> <body> <% Response.Cache.SetNoStore (); Response.Write (DateTime.Now.ToLongTimeString ()); %> </body> </html> SetNoStore works by returning a Cache-Control: private, no-store header in the HTTP response. In this example, it prevents… Continue reading

Calling Postback from Javascript

There may be some scenario where you may want to explicitly postback to the server using some clientside javascript. It is pretty simple to do this. ASP.NET already creates a client side javascript method as shown below to support Postbacks for the web controls: function __doPostBack(eventTarget, eventArgument) { if (!theForm.onsubmit… Continue reading

What is SOAP?

SOAP (Simple Object Access Protocol) is a simple XML-based messaging protocol to let applications exchange information over HTTP. It defines a set of rules for structuring messages that can be used for simple one-way messaging but is particularly useful for performing RPC-style (Remote Procedure Call) request-response dialogues. It is not… Continue reading

Main differences between ASP and ASP.NET.

ASP (Active Server Pages) and ASP.NET are both server side technologies for building web sites and web applications, ASP.NET is Managed compiled code – asp is interpreted. and ASP.net is fully Object oriented. ASP.NET has been entirely re-architected to provide a highly productive programming experience based on the .NET Framework,… Continue reading

ASP.NET Routing not working on IIS 7.0

I ran into a nasty little problem today when deploying an application using ASP.NET 4.0 Routing to my live server. The application and its Routing were working just fine on my dev machine (Windows 7 and IIS 7.5), but when I deployed (Windows 2008 R1 and IIS 7.0) Routing would… Continue reading

How to disable back button of browser?

By using java script it can be done <script language=”JavaScript”>javascript:window.history.forward(1);</script> Or <A HREF=”PageName.htm” onclick=”javascript:location.replace(this.href); event.returnValue=false; “>No back button when you do this.</A> Or <html><head><title>Back Button Demo: Page One</title> <script> function backButtonOverride() {  setTimeout(“backButtonOverrideBody()”, 1);  } function backButtonOverrideBody() { try { history.forward(); } catch (e) { } setTimeout(“backButtonOverrideBody()”, 500); } </script></head><body… Continue reading