Click here to Skip to main content
15,897,187 members
Articles / Web Development / ASP.NET

Work smarter not harder: “Navigate Away” feature for your ASP.NET/other web applications made easy

Rate me:
Please Sign up or sign in to vote.
4.91/5 (33 votes)
14 Dec 2010CPOL10 min read 113.8K   900   63  
A jQuery script that lets you display the “Navigate Away” browser message when an input field value is changed in the page, and for that, you don’t need to write any code!
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <script language="javascript" src="js/jquery.js"></script>
    <script language="javascript" src="js/navigateaway.min.js"></script>
    
    <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
        
        </asp:ContentPlaceHolder>
    </div>
    </form>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Founder SmartAspects
Bangladesh Bangladesh
I write codes to make life easier, and that pretty much describes me.

Comments and Discussions