Hi Sevu,
 
1. Register type for ajax in your page_load routine?
 
        protected void Page_Load(object sender, EventArgs e)
        {
          AjaxPro.Utility.RegisterTypeForAjax(typeof(ClassName), Page);
        }
 
2. Declare class for Ajax namespace:
    [AjaxPro.AjaxNamespace("AutoComplete")]
    public partial class ClassName : System.Web.UI.UserControl
    {
      ....
     }
 
   or
    [AjaxPro.AjaxNamespace("AutoComplete")]
    public partial class ClassName : System.Web.UI.Page
   {
      ....
   }
 
3. Declare AjaxMethod
    [AjaxPro.AjaxMethod]
        public DataTable Search(string search, int count)
        {
        ....
      }
4. Include _javascript_ source autocomplete.js in your code.
 
5. Configure your web.config to allow ms.ashx
     * make sure under old style section, you have included <includeMsPrototype/>
 
 

<configSections>
    <sectionGroup name="ajaxNet">

      <!--
    If you are using Microsoft .NET 1.1 please remove the two attributes
    requirePermission and restartOnExternalChanges, they are only supported
    with .NET 2.0.
   -->
      <section name="ajaxSettings"
    type="AjaxPro.AjaxSettingsSectionHandler,AjaxPro.2"
    requirePermission="false"
    restartOnExternalChanges="true"
   />

    </sectionGroup>
  </configSections>

  <ajaxNet>
    <ajaxSettings>

      <urlNamespaceMappings useAssemblyQualifiedName="false" allowListOnly="false">
        <!--
     Set the attribute useAssemblyQualifiedName to true to enable
     use of assemblies placed in the GAC by using the full assembly
     qualified name.
    
     To hide internal knowledge of assemblies, classes and namespace
     you can override the name of the virtual http endpoints.
     
     <add type="Namespace.Class1 ,Assembly" path="mypath" />
    -->
      </urlNamespaceMappings>

      <jsonConverters>
        <!--
     This section can be used to add new IJavaScriptConverters to the
     Ajax.NET Professional engine. If you want to disable built-in
     converters you can use the remove tag.
   
     <remove type="Namespace.Class1,Assembly"/>
     <add type="Namespace.Class2,Assembly"/>
     
     <add type="AjaxPro.BitmapConverter,AjaxPro.2" mimeType="image/jpeg" quality="100"/>
    -->
      </jsonConverters>

      <!--
    Set the enabled attribute to true to get Stack, TargetSize and Source
    information if an exception has been thrown.
   -->
      <debug enabled="false" />

      <!--
    This is the default configuration used with Ajax.NET Professional. You
    can put there your static _javascript_ files, or remove the path attribute
    to completly disable the files.
   
    <scriptReplacements>
     <file name="prototype" path="~/ajaxpro/prototype.ashx" />
     <file name="core" path="~/ajaxpro/core.ashx" />
     <file name="converter" path="~/ajaxpro/converter.ashx" />
          <file name="ms" path="~/ajaxpro/ms.ashx" />
    </scriptReplacements>
   -->

      <!-- <encryption cryptType="" keyType="" /> -->

      <!--
    Set the enabled attribute to true to enable the use of an Ajax.NET Professional
    token. This will send a token to the client that will be used to identify if the
    requests comes from the same PC.
   -->
      <token enabled="false" sitePassword="password" />

      <!--
    The oldStyle section can be used to enable old styled _javascript_ code or
    functions that are not used any more.    
    <oldStyle>
     <objectExtendPrototype/>
     <appCodeQualifiedFullName/>
     <allowNumberBooleanAsString/>
     <sessionStateDefaultNone/>
     <includeMsPrototype/>
    </oldStyle>
      -->
      <oldStyle>
        <includeMsPrototype/>
      </oldStyle>

    </ajaxSettings>
  </ajaxNet>

   Hope this help
 
   Lawson

 
On 7/6/06, Sevu <[EMAIL PROTECTED]> wrote:

Hi schwarz,

          Really your ajax libraries are very nice.I try to use your
AutoComplete control by refering the below metioned link.

http://munich.schwarz-interactive.de/autocomplete.aspx

I just added autocomplete.js in to my project and _javascript_ init()
function to my webform.Also web.config settings are done.While running
the below mentioned line,I am getting the js exception that object
expected.

addNamespace("MS.Web.AutoComplete");

I need to add any reference? ( or ) any piece of code?Please help me.

Thanks in advance,
Sevu.



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to