When I write JavaScript code in the following format:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
...
It runs perfectly and the JavaScript functions as expected.
However, when I use the same JavaScript code on another page like this:
<%@ Page Title="About Us" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
CodeFile="About.aspx.cs" Inherits="About" %>
...
The JavaScript does not work without any error messages.
I am using Visual Studio 2010 for ASP.NET C# development.