The following code works fine on our DEV servers running ASP 1.1
As soon as it is copied to the production server it fails to execute
with the ASP undefined message.
The ASP.AllIn_aspx ...ashx is generated but it is empty. All others
ashx files look complete.
The location is in a subweb folder with forms security.
BUT this page works on the prod server in a directory with no forms
security - not sure why it should be different.
What am I missing??
Cheers - Stephen.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Page language="c#" AutoEventWireup="false" %>
<%@ Import Namespace="AjaxPro"%>
<html>
<head>
</head>
<body>
<form id="placeOrder" method="post" runat="server">
<input type=button onclick="GetTime()" text="pressme"/></
input>
<label id="date"></label>
</form>
<body>
<script type="text/javascript" defer>
function GetTime()
{
var results = ASP.AllIn_aspx.Time().value;
alert(results);
}
</script>
</html>
<script language=C# runat=server>
protected void Page_Load(object sender, System.EventArgs e)
{
base.Page_Load(sender, e);
string x = this.GetType().ToString();
AjaxPro.Utility.RegisterTypeForAjax( this.GetType() );
}
[AjaxMethod]
public string Time()
{
return DateTime.Now.ToString();
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
</script>