{"id":606,"date":"2011-03-03T12:30:42","date_gmt":"2011-03-03T16:30:42","guid":{"rendered":"http:\/\/www.iowawebnet.com\/ein\/?p=606"},"modified":"2011-03-03T12:30:42","modified_gmt":"2011-03-03T16:30:42","slug":"disable-back-button","status":"publish","type":"post","link":"https:\/\/www.iowawebnet.com\/ein\/2011\/03\/disable-back-button\/","title":{"rendered":"Disable Back Button"},"content":{"rendered":"<p><a rel=\"attachment wp-att-607\" href=\"http:\/\/www.iowawebnet.com\/ein\/?attachment_id=607\"><\/a><a rel=\"attachment wp-att-607\" href=\"http:\/\/www.iowawebnet.com\/ein\/?attachment_id=607\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-607\" title=\"My Page - Disable Back Button\" src=\"http:\/\/www.iowawebnet.com\/ein\/wp-content\/uploads\/2011\/03\/ScreenShot014.gif\" alt=\"\" width=\"500\" height=\"289\" srcset=\"https:\/\/www.iowawebnet.com\/ein\/wp-content\/uploads\/2011\/03\/ScreenShot014.gif 735w, https:\/\/www.iowawebnet.com\/ein\/wp-content\/uploads\/2011\/03\/ScreenShot014-300x173.gif 300w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p><strong>My .aspx Page<\/strong><\/p>\n<blockquote><p>&lt;%@ Page Language=&#8221;VB&#8221; AutoEventWireup=&#8221;false&#8221; CodeFile=&#8221;Page1.aspx.vb&#8221; Inherits=&#8221;_Default&#8221; %&gt;<\/p>\n<p>&lt;!DOCTYPE html PUBLIC &#8220;-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN&#8221; &#8220;http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd&#8221;&gt;<\/p>\n<p>&lt;html xmlns=&#8221;http:\/\/www.w3.org\/1999\/xhtml&#8221; &gt;<br \/>\n&lt;head runat=&#8221;server&#8221;&gt;<br \/>\n&lt;title&gt;Page 1&lt;\/title&gt;<br \/>\n<span style=\"color: #000000;\">&lt;script type = &#8220;text\/javascript&#8221; &gt;<br \/>\nfunction preventBack(){window.history.forward();}<br \/>\nsetTimeout(&#8220;preventBack()&#8221;, 10);<br \/>\nwindow.onunload=function(){null};<br \/>\n&lt;\/script&gt;<\/span><br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n&lt;form id=&#8221;form1&#8243; runat=&#8221;server&#8221;&gt;<br \/>\n&lt;h1&gt;My Page&lt;\/h1&gt;<br \/>\n&lt;div&gt;<br \/>\nTake me to Google&lt;br \/&gt;<br \/>\n&lt;asp:Button ID=&#8221;Button1&#8243; runat=&#8221;server&#8221; Text=&#8221;Google&#8221; \/&gt;<br \/>\n&lt;\/div&gt;<br \/>\n&lt;\/form&gt;<br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt;<\/p><\/blockquote>\n<p><strong>Code Behind Page<\/strong><\/p>\n<blockquote><p>Partial Class _Default<br \/>\nInherits System.Web.UI.Page<\/p>\n<p>Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click<br \/>\nResponse.Redirect(&#8220;http:\/\/google.com&#8221;)<br \/>\nEnd Sub<\/p>\n<p>Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load<br \/>\nEnd Sub<br \/>\nEnd Class<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>My .aspx Page &lt;%@ Page Language=&#8221;VB&#8221; AutoEventWireup=&#8221;false&#8221; CodeFile=&#8221;Page1.aspx.vb&#8221; Inherits=&#8221;_Default&#8221; %&gt; &lt;!DOCTYPE html PUBLIC &#8220;-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN&#8221; &#8220;http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd&#8221;&gt; &lt;html xmlns=&#8221;http:\/\/www.w3.org\/1999\/xhtml&#8221; &gt; &lt;head runat=&#8221;server&#8221;&gt; &lt;title&gt;Page 1&lt;\/title&gt; &lt;script type = &#8220;text\/javascript&#8221; &gt; function preventBack(){window.history.forward();} setTimeout(&#8220;preventBack()&#8221;, 10); window.onunload=function(){null}; &lt;\/script&gt; &lt;\/head&gt; &lt;body&gt; &lt;form id=&#8221;form1&#8243; runat=&#8221;server&#8221;&gt; &lt;h1&gt;My Page&lt;\/h1&gt; &lt;div&gt; Take me to Google&lt;br \/&gt; &lt;asp:Button ID=&#8221;Button1&#8243; runat=&#8221;server&#8221; Text=&#8221;Google&#8221; \/&gt; &lt;\/div&gt; [&hellip;]<\/p>\n","protected":false},"author":35,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,16,43],"tags":[19,37],"class_list":["post-606","post","type-post","status-publish","format-standard","hentry","category-applications","category-net","category-javascript-2","tag-asp-net","tag-javascript"],"_links":{"self":[{"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/posts\/606"}],"collection":[{"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/users\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/comments?post=606"}],"version-history":[{"count":14,"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/posts\/606\/revisions"}],"predecessor-version":[{"id":621,"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/posts\/606\/revisions\/621"}],"wp:attachment":[{"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/media?parent=606"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/categories?post=606"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/tags?post=606"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}