Showing posts with label trivial. Show all posts
Showing posts with label trivial. 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

AJAX best-practice page design

This may seem like a trivial question, but I have been away from web-based programming for some time and am not sure what the current best-practice is for page layout. Over the years there have been many approaches to web page design: frames, tables, masterpages, etc...

I'm asking because i'm trying to make an AJAX web-app with toolbars above and to the side of the content. Take a look at the current pages atwww.stairmand.com. There isn't any real content linked to the menus, but its enough to demonstrate my question. I managed to place the content in the correct position using an iframe (which i don't like), but i'd like to acheive an AJAX style content area... with "loading"images, etc. The problem is that the content is all dynamically generated in asp.net too, and I haven't worked out a way to place this in a div dynamically.

I'm sure there must be a really simple way to do this, either directly using javascript or one of the Ajax Toolkit components, but i'm stuck! I manage to put a static html string into a div with no problem, but how do i do this with dynamic pages - for example to return a datagrid. Help!!!!

if you want a page that is changed depending on selections made above and to the side menus of the page i would use a masterpage with a iframe. The master page can then use its menu options to tell the iframe where to go while keeping the menus in their current state


Ok.. in that case it seems like i'm doing the right thing. Is it possible to show an "updating" image while the i frame is loading?


yes, using ajax you can place this item called the "UpdateProgress" on a page. Basically you tie this to an update panel and set a time in milliseconds. This time determins after how long of the update panels loading time should the contents of the updateprogress should be shown. So if updateProgress contaings the word loading and a .gif pic that spins around, as soon as the update panel has spent more then the entered amount of time loading, the text and image will be shown to the user and take away when the panel is loaded

better yet just watch this, it will show you everything

http://www.asp.net/learn/videos/view.aspx?tabid=63&id=123


Excellent.

Thanks very much for your help!


no problem. if this info helped please mark as an answer, it gimes me points, which boost my confidence in all aspects of my lifeHmm


You can use UpdateProgress Control for it..

Here you will get details..

http://ajax.asp.net/docs/overview/UpdateProgressOverview.aspx