Showing posts with label ive. Show all posts
Showing posts with label ive. Show all posts

Wednesday, March 28, 2012

AJAX Beta 1.0 - Odd Behaviour of AutoCompleteExtender

Moving to Beta 1.0 has not been a trivial task. I've been using AutoCompleteExtender for a while now and it was working quite well with the CTP. Upgrade to AJAX Beta 1.0 and everything stops working, and this is WITH the Value-Add CTP included as well.

Here is what I ran into:

My webservice method was never being called. I spent 3 hours on trying to figure out why my complex form wasn't calling the webservice when I'd put in a value. Turns out that with the CTP the parameter names on the web method didn't matter, but theyDO matter in beta 1.0.

Originally I had the following signature:

Public Function GetCustomers(ByVal prefixTextAs String,ByVal maxCountAs Integer)As String()
I then switched this this method signature and everything started working:
Public Function GetCustomers(ByVal prefixTextAs String,ByVal countAs Integer)As String()

I then went back and fixed all of my other autocompletes, but one still doesn't work. If you try and use the AutoComplete within a gridview control (I'm trying to let my user add rows by providing a row at the bottom with fields), the control never gets registered for autocomplete.

This used to work in the Atlas CTP. I've tried everything I can think of but no luck fixing this one.

Last thing, when a form has an AutoCompleteExtender and I click on a asp:hyperlink I get an exception thrown by WebResource.axd in the following code:

Sys.UI.DomElement.getVisible = function Sys$UI$DomElement$getVisible(element) {/// <param name="element" type="Sys.UI.DomElement"></param> /// <returns type="Boolean"></returns> var e = Function._validateParams(arguments, [ {name:"element", type: Sys.UI.DomElement} ]);if (e)throw e;return (element.style.visibility !=='hidden');}
The exception thrown is:
Microsoft JScript runtime error: Sys.ArgumentUndefinedException: Value cannot be undefined.Parameter name: element

All in all this has been a pretty frustrating upgrade. The CTP had been working so well for so long that I felt like moving to the Ajax Beta would be a safe proposition...
Charles

Another bugs:

I have AutoCompleteExtender in Wizard control on 3rd step. When I load a page, Javascript error occurs:
1if (!type.inheritsFrom(Sys.Component)) {
2 throw Error.argument('type', String.format(Sys.Res.createNotComponent, type.getName()));
3 }
4if (type.inheritsFrom(Sys.UI.Behavior) || type.inheritsFrom(Sys.UI.Control)) {
5 if (!element) throw Error.argument('element', Sys.Res.createNoDom);
6 }
on line 6 (i code it is line 1960):
Sys.ArgumentException: Value must not be null for Control and Behaviors.
Parameter name: element

I really don't know what to do with it


For us it has been the same. However, changing parameters names does not do the trick...

Can you please provide a short fragement of an ASP page with an AutoComplete that actually works with the new value added package?

Thanks,

J


I am also havin the same problem.I have uninstalled Atlas,installed the Asp.net Ajax and theJuly CTP .I recreated the project with Autocomplete extender but the webservice method is never being called and there are also no errors.

Guimauve, I would appreciate if u can post a sample code on how you made the extender call the webservice method?

Thanks,

PSK


The javascript errors are pretty annoying. Hopefully it wont be long for beta 2 (or beta 1.1?).:-) It is a shame that the CTP was going so well that it feels like a step backwards but they won't have made these changes for nothing and remember we are rather early adopters! If we shouldn't use beta's for production code then CTP is even more risky :-)

For the AutoCompleteExtender make sure your web service has the ScriptService tag as not having it fails silently. E.G:

[Microsoft.Web.Script.Services.ScriptService]
[WebService(Namespace =http://tempuri.org/)]
[WebServiceBinding(ConformsTo =WsiProfiles.BasicProfile1_1)]


Hi, i have de same Exception (description = "Sys.ArgumentUndefinedException: Value cannot be undefined. Parameter name: element")in WebResource.axd (function Sys$UI$DomElement$getVisible(element)).But my Webservice (or ScriptService) is working fine. I fink the Control is working fine. Everything looks ok, but after Postback (some Applications still need it), pug!Dave
There is a a thread with a sample posted on issue regdin AutoCompleteextenderhttp://forums.asp.net/thread/1437583.aspxIts the same as thx 1137 pointed out

Monday, March 26, 2012

Ajax autocomplete - problem with scrollbar

I've implemented autocomplete extender with a textbox,

I'm retreiving thousands of records in the autocomplete search, and depending on the value selected in the autocomplete search results i'm doing some other operation. ( I've associated a textchanged event with the textbox ).

My Problem - Though i'm retreiving thousands of records in the search, but the moment i drag the scrollbar to scroll down to see results, the textbox event is triggered and the scrollbar disappears. i.e i'm not able to scroll through the records.

I'm stuck on this issue for days now. Please suggest me a way so that i can scroll down all the records and able to trigger event based on the record selection.

Many thanks,

DotNetSpidy

MCP, MCTS

HAI I have just joined ajax community

I have read ur question and i just the problem here is that , u are using textchanged event due to when next item get selected textbox event is triggered ,

i will u to try lostfocus event for textbox , in this case when u can scroll all the values and event will be triggered as soon as textbox lost focus . (this is the way i use )

IS this helpful , please remind me


Can you post your code so we can get a full picture of what you are doing?

Tim


HI, thanks for replies,

I found the solution, set the Autopostback = false, use Ajax latest control toolkit, and implemented a OnClientItemSelected event of the Autocomplete extender, then i handled the event.

Thanks for help,

dotNetSpidy

Saturday, March 24, 2012

ajax and page_PreInit

Can someone please explain this to me.

Ive been trying to add some controls to a placeholder situated within a updatepanel.

According to microsoft i should create all dynamic controls in the page_preinit method. However when i did this the placeholder object was null.

When i moved the placeholder out of the updatepanel everything worked as expected

I moved the placeholder back into the updatepanel and moved the code to the page_preload method and i can now access the placeholder fine.

Im presuming that anything within an updatepanel cannot be access in the page_preiinit method, but can someone explain why.

Thanks in advance

Hi, I am having the same problem. Did you ever get an answer as to why this happens?

Thanks,

Steve