More Group Sites
Education Books
School Rankings
Jobless Net
Better Home
Enviro++
更好教育论坛


Help | Subscribe/Unsubscribe | Rules | Other Group Sites: Better Education | Better Education Forum
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Share
Options
View
Go to last post Go to first unread
hong  
#1 Posted : Tuesday, 5 June 2012 6:15:51 PM(UTC)
hong

Rank: Administration

Reputation:

Groups: AcademicCoachingSchool, admin, Administration, BookSeller, CatholicSchool, CoachingAdult, CoachingProfessional, CoachingSports, ExtraCurriculumCoaching, IndependentSchool, Moderator, MusicTeacher, PrivateSchool, PublicSchool, SelectiveSchool, tutor
Joined: 23/11/2008(UTC)
Posts: 519

After I migrated my website to .Net 3.5 from 2.0, I installed AJAX control toolkit for .Net 3.5. First thing I tried was AJAX Autocomplete extender as follows.
Code:
    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" CombineScripts="True">
    </asp:ToolkitScriptManager>
    <asp:TextBox ID="TextBoxMovies" runat="server"></asp:TextBox>
    <asp:AutoCompleteExtender ID="TextBoxMovies_AutoCompleteExtender" 
        runat="server" DelimiterCharacters="" Enabled="True" 
        ServiceMethod="GetCompletionList" 
        TargetControlID="TextBoxMovies" UseContextKey="True">
    </asp:AutoCompleteExtender>


Code:
    [System.Web.Services.WebMethodAttribute(), System.Web.Script.Services.ScriptMethodAttribute()]
    public static string[] GetCompletionList(string prefixText, int count, string contextKey)
    {
        string[] movies = { "Star Wars", "Star Trek", "Superman", "Memento", "Shrek", "Shrek II" };

        // Return matching movies
        return (from m in movies where m.StartsWith(prefixText, StringComparison.CurrentCultureIgnoreCase) select m).Take(count).ToArray();
    }


I stuck with the error "Microsoft JScript runtime error: Unable to get value of the property 'UI': object is null or undefined" for a while.

I had to try creating a new web application using .Net 3.5 without .Net migration. As expected, the AJAX autocomplete worked straightaway. So what's wrong with the migration, I still don't have a clue. It seems everything else works fine. Eventually I found a workaround - setting CombineScripts="false" in ToolkitScriptManager. It starts working. Does this mean there is an issue with script combiner?
Sponsor
hong  
#2 Posted : Saturday, 10 October 2015 9:38:43 PM(UTC)
hong

Rank: Administration

Reputation:

Groups: AcademicCoachingSchool, admin, Administration, BookSeller, CatholicSchool, CoachingAdult, CoachingProfessional, CoachingSports, ExtraCurriculumCoaching, IndependentSchool, Moderator, MusicTeacher, PrivateSchool, PublicSchool, SelectiveSchool, tutor
Joined: 23/11/2008(UTC)
Posts: 519

The same issue occurred with ModalPopupExtender with ASP.NET 4.0. The same workaround (adding CombineScripts="false") works. My AjaxControlToolkit version is 3.5.7.0725. I installed AjaxControlToolkit V15.1.2. It seems it doesn't have ToolkitScriptManager and is smaller in file size.

Code:
    
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" CombineScripts="false">
    </asp:ToolkitScriptManager>

Edited by user Saturday, 10 October 2015 10:18:48 PM(UTC)  | Reason: Not specified

Rss Feed  Atom Feed
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.