|
Object expected error in AutoComplete textbox. -- Sevu --
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. |
|
-- lawson law --
Hi Sevu, 1. Do you register type for ajax in your page_load routine? protected void Page_Load(object sender, EventArgs e) { AjaxPro.Utility.RegisterTypeForAjax(typeof(ClassName), Page); } 2. Do you declare class for Ajax namespace: public partial class ClassName : System.Web.UI.UserControl { .... } or public partial class CustomerServiceWizard : System.Web.UI.UserControl { On 7/6/06, Sevu 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. > |
|
-- lawson law --
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: public partial class ClassName : System.Web.UI.UserControl { .... } or public partial class ClassName : System.Web.UI.Page { .... } 3. Declare 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 type="AjaxPro.AjaxSettingsSectionHandler,AjaxPro.2" requirePermission="false" restartOnExternalChanges="true" /> Hope this help Lawson On 7/6/06, Sevu 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. > |
|
-- lawson law --
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: public partial class ClassName : System.Web.UI.UserControl { .... } or public partial class ClassName : System.Web.UI.Page { .... } 3. Declare 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 type="AjaxPro.AjaxSettingsSectionHandler,AjaxPro.2" requirePermission="false" restartOnExternalChanges="true" /> Hope this help Lawson On 7/6/06, Sevu 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. > |
|
-- lawson law --
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: public partial class ClassName : System.Web.UI.UserControl { .... } or public partial class ClassName : System.Web.UI.Page { .... } 3. Declare 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 type="AjaxPro.AjaxSettingsSectionHandler,AjaxPro.2" requirePermission="false" restartOnExternalChanges="true" /> Hope this help Lawson On 7/6/06, Sevu 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. > |
|
-- Sevu --
Hi lawson, Thanks for your reply.Now the issue is solved.Issues are as follows. 1.I am not included the following line in web.config. 2.Previously i am simply added the textbox ( Say customer Ajax TextBox) in webform.Now i had one master page and asp:Content is added to the webform and include the texbox with in asp:Content. This 2 things solved my issues.If iam miseed out any one then i got the above mentioned exception. I have one doubt here.It is not possible to include the autocomplete textbox directly to form without any asp:Content? Thanks for your reply. Sevu. |
|
-- lawson law --
Hi Sevu, If you use master page, you need to have content within it. asp:Content can have any web control or user control. You may create autocomplete in a user control and place your user control in your asp:Content. In this way, you only need to change whatever code in your user control instead of your page control. Lawson On 7/6/06, Sevu Hi lawson, Thanks for your reply.Now the issue is solved.Issues are as follows. 1.I am not included the following line in web.config. 2.Previously i am simply added the textbox ( Say customer Ajax TextBox) in webform.Now i had one master page and asp:Content is added to the webform and include the texbox with in asp:Content. This 2 things solved my issues.If iam miseed out any one then i got the above mentioned exception. I have one doubt here.It is not possible to include the autocomplete textbox directly to form without any asp:Content? Thanks for your reply. Sevu. > |