---------- Forwarded message ----------
From: Rizal Ricky Rumanda <[EMAIL PROTECTED]>
Date: Jul 28, 2006 2:50 PM
Subject: Ajaxpro: namespace undefine when enablesessionstate="true"
To: [EMAIL PROTECTED]

hi guys..
can anybody can help me..??

i have a problem with ajaxpro 6.7.11.1 and visual studio.net 2003

- i add this in web.config:
<httpHandlers>
        <add verb="*" path="ajaxpro/*.ashx"
type="AjaxPro.AjaxHandlerFactory, AjaxPro" />
        <remove verb="*" path="*.asmx"/>
        <add verb="*" path="*.asmx" type="AjaxPro.AjaxHandlerFactory ,
AjaxPro" />
   </httpHandlers>


- codebehind: WebForm1.asp.cs

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing ;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace Test
{
    /// <summary>
    /// Summary description for WebForm1.
    /// </summary>
    public class WebForm1 : System.Web.UI.Page
    {
        private void Page_Load(object sender, System.EventArgs e)
        {
            // Put user code to initialize the page here
            AjaxPro.Utility.RegisterTypeForAjax(typeof(WebForm1));
        }

        [AjaxPro.AjaxMethod]
        public string Test()
        {
            return "Hello World..!!";
        }

        #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()
        {

        }
        #endregion
    }
}

- WebForm1.aspx :
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs"
AutoEventWireup="false" Inherits="Test.WebForm1"
EnableSessionState="True"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >

<html>
  <head>
    <title>WebForm1</title>
    <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
    <meta name="CODE_LANGUAGE" Content="C#">
    <meta name=vs_defaultClientScript content="_javascript_">
    <meta name=vs_targetSchema
content="http://schemas.microsoft.com/intellisense/ie5 ">
  </head>
  <script type="text/_javascript_">
  function runTest() {
        var hello= Test.WebForm1.Test().value;

        alert(hello);
  }
  </script>
  <body MS_POSITIONING="GridLayout">

    <form id="Form1" method="post" runat="server">
                <input type="button" id="ButtonTest" value=" Test " />
    </form>

  </body>
</html>


When I click ButtonTest there is an error message that tell me that
'Test' undefine..

this message are available after i add enablesessionstate="true"

before i add that code my ajax is running well..
anyone can help me please..
show the ref or solution to solve this problem

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ajax.NET Professional" group.

To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]

For more options, visit this group at http://groups.google.com/group/ajaxpro

The latest downloads of Ajax.NET Professional can be found at http://www.ajaxpro.info/

Don't forget to read my blog at http://weblogs.asp.net/mschwarz/
-~----------~----~----~----~------~----~------~--~---

Reply via email to