ConvincingMail - Email Marketing SoftwareConvincingMail
 
Email Marketing Software

Welcome Guest Search | Active Topics | Members | Log In | Register

Sample with Control doesnt work on localhost Options · View
toologic
Posted: Wednesday, January 27, 2010 11:27:01 AM
Rank: Member
Groups: Member

Joined: 1/27/2010
Posts: 11
Points: 33
Location: Russia, Moscow
Hello!
I install your sample (2.0.2.4) on localhost and correct connection string to my MS SQL 2008 express ( and also correct tables and filed names. I know sql and test my request on database. It is correct and have answer-table-rows)

How i run sample and click on state-textfield I see animated cursor and tips-loaded. This is all. I wait 1-2-5 and 10 minutes - no state (in my case - countries) list.

No error! No answer...

What s wrong?

My machine config: Win XP SP3, IIS 5.1, .Net 2.0, MS SQL 2008express

In web config added
Code:


    <webServices>
        <protocols>
            <add name="HttpSoap"/>
            <add name="HttpPost"/>
            <add name="HttpGet"/>
            <add name="Documentation"/>
            <add name="HttpPostLocalhost"/>
        </protocols>
    </webServices>


All another AjaxToolokit & Extesion worked right ans correct.
trooper
Posted: Wednesday, January 27, 2010 12:06:45 PM
Rank: Administration
Groups: Administration

Joined: 11/18/2007
Posts: 80
Points: 152
Hi,
can you try this:
1.can you try to check if the asmx service returns results.
2. enable debuging console for the control and post the contents here.
3. also I recommend you install FireFox and Firbug plugin to see all AJAX requests and responses.

Thanks
Mikhail
toologic
Posted: Wednesday, January 27, 2010 1:39:51 PM
Rank: Member
Groups: Member

Joined: 1/27/2010
Posts: 11
Points: 33
Location: Russia, Moscow
I have next response from Suggestion.asmx/StateSuggest (using XmlHttpRequest debugging for IE)
Header
Code:

Server: Microsoft-IIS/5.1
Date: Wed, 27 Jan 2010 21:36:35 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=utf-8
Content-Length: 9957


Body
Code:

<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://convincingmail.com/">[{"Id":"ABH","Title":"\u003cspan class=\"hilighted\"\u003e\u003c/span\u003eАбхазия\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e","Description":"","TitleValue":"Абхазия "},{"Id":"AD","Title":"\u003cspan class=\"hilighted\"\u003e\u003c/span\u003eАндорра\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e","Description":"","TitleValue":"Андорра "},{"Id":"AE","Title":"\u003cspan class=\"hilighted\"\u003e\u003c/span\u003eОАЭ\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e","Description":"","TitleValue":"ОАЭ "},{"Id":"AF","Title":"\u003cspan class=\"hilighted\"\u003e\u003c/span\u003eАфганистан\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e","Description":"","TitleValue":"Афганистан "},{"Id":"AFR","Title":"\u003cspan class=\"hilighted\"\u003e\u003c/span\u003eАфрика\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e","Description":"","TitleValue":"Африка "}]</string>


But i dont see this request as dropdown list in my page :(
trooper
Posted: Wednesday, January 27, 2010 2:04:01 PM
Rank: Administration
Groups: Administration

Joined: 11/18/2007
Posts: 80
Points: 152
Can post your .aspx code here?
It looks like ServiceUrl field of the control is wrong. Please check that the path is correct.

Thanks
Mikhail
toologic
Posted: Thursday, January 28, 2010 10:24:37 AM
Rank: Member
Groups: Member

Joined: 1/27/2010
Posts: 11
Points: 33
Location: Russia, Moscow
A part of WebUserControl.ascx
Code:

            <cc1:AdvancedAutoSuggestExtender
            HeaderTemplate="<div style='background-color:#BDC7D8; height:20px; text-align:center;'>#{Contents}</div>"
            FooterTemplate="<div style='background-color:#BDC7D8; height:20px; text-align:right; vertical-align:bottom;'>#{Contents}</div>"
            SuggestOnEmptyField="true"
            TargetControlID="StateTextBox"
            ServiceUrl="~/Suggestions.asmx/StateSuggest"
            OnClientItemSelected="State_OnSelect" 
            OnClientHidden="State_Hidden"
            OnClientHiding="State_Hidding"
            OnClientItemOut="State_ItemOut"
            OnClientItemOver="State_ItemOver"
            OnClientPopulated="State_Populated"
            OnClientPopulating="State_Populating"
            OnClientShowing="State_Showing"
            OnClientShown="State_Shown"            
            LoadingText="...LOADING..." LoadingDivCss="loading"
            ID="StateAASE"
            runat="server" 
             />


I dont change any code, exclude connectionString (and table, fields name to my database)

Sample was installed in virtual catalog localhost/ajax
toologic
Posted: Thursday, January 28, 2010 10:56:21 AM
Rank: Member
Groups: Member

Joined: 1/27/2010
Posts: 11
Points: 33
Location: Russia, Moscow
This is answer your sample (from site)
Code:

<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://convincingmail.com/">{"Header":{"Contents":"Please select your state."},"Items":[{"Id":"1","Title":"\u003cspan class=\"hilighted\"\u003e\u003c/span\u003eMARYLAND","Description":"","TitleValue":"MARYLAND"},{"Id":"2","Title":"\u003cspan class=\"hilighted\"\u003e\u003c/span\u003eDELAWARE","Description":"","TitleValue":"DELAWARE"},{"Id":"3","Title":"\u003cspan class=\"hilighted\"\u003e\u003c/span\u003eWISCONSIN","Description":"","TitleValue":"WISCONSIN"},{"Id":"4","Title":"\u003cspan class=\"hilighted\"\u003e\u003c/span\u003eMONTANA","Description":"","TitleValue":"MONTANA"},{"Id":"5","Title":"\u003cspan class=\"hilighted\"\u003e\u003c/span\u003eKENTUCKY","Description":"","TitleValue":"KENTUCKY"},{"Id":"6","Title":"\u003cspan class=\"hilighted\"\u003e\u003c/span\u003eTEXAS","Description":"","TitleValue":"TEXAS"},{"Id":"7","Title":"\u003cspan class=\"hilighted\"\u003e\u003c/span\u003eLOUISIANA","Description":"","TitleValue":"LOUISIANA"}],"Footer":{"Contents":"Powered by ConvincingMail"}}</string>


This is a my localhost sample response
Code:

<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://convincingmail.com/">[{"Id":"ABH","Title":"\u003cspan class=\"hilighted\"\u003e\u003c/span\u003eАбхазия","Description":"","TitleValue":"Абхазия"},{"Id":"AD","Title":"\u003cspan class=\"hilighted\"\u003e\u003c/span\u003eАндорра","Description":"","TitleValue":"Андорра"},{"Id":"AE","Title":"\u003cspan class=\"hilighted\"\u003e\u003c/span\u003eОАЭ","Description":"","TitleValue":"ОАЭ"},{"Id":"AF","Title":"\u003cspan class=\"hilighted\"\u003e\u003c/span\u003eАфганистан","Description":"","TitleValue":"Афганистан"},{"Id":"AFR","Title":"\u003cspan class=\"hilighted\"\u003e\u003c/span\u003eАфрика","Description":"","TitleValue":"Африка"}]</string>


In my response isnt a Header, Items and Footer definitions! Where (how) and when this definitions are formed?

Very big code "class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan class=\"hilighted\"\u003e \u003c/span\u003e\u003cspan" from previous response I trimmed by adding next operator

in Suggestions.cs

Code:

if (!Convert.IsDBNull(dr["StateName"])) {
    state = dr["StateName"].ToString().Trim();
}
trooper
Posted: Thursday, January 28, 2010 2:20:51 PM
Rank: Administration
Groups: Administration

Joined: 11/18/2007
Posts: 80
Points: 152
Hi,
Remove HeaderTemplate and FooterTemplate from the control declaration. (or add the header & footer templates content in the json string your serverside function returns.)

Please let me know if this helps. If so I think that I need to change the code and make ignore templates if the server returned no template info.

Thanks
Mikhail
toologic
Posted: Friday, January 29, 2010 2:32:47 PM
Rank: Member
Groups: Member

Joined: 1/27/2010
Posts: 11
Points: 33
Location: Russia, Moscow
Sorry! But it is not help me!

I attach my test code (default.*, webusercontrol.*, /app_code/suggestion, /bin/ConvincingMail.AdvancedAutoSuggest.dll (from codeplex))

May be it help for your to understand, where i do mistakes...

You can download this from http://old.tours.ru/upload/_aa.zip
toologic
Posted: Friday, January 29, 2010 2:47:23 PM
Rank: Member
Groups: Member

Joined: 1/27/2010
Posts: 11
Points: 33
Location: Russia, Moscow
Hm! I can get a solution (right response with views dropdown list) only if forcibly add to code next text in suggestions.cs-StateSuggest

return "{\"Items\":"+SuggestionItem.SuggestionArrayToJSON(items.ToArray(), tryValue)+"}";

trooper
Posted: Friday, January 29, 2010 3:27:27 PM
Rank: Administration
Groups: Administration

Joined: 11/18/2007
Posts: 80
Points: 152
Hi,
Yes I just noticed that your JSON contains only the array. for the version 2.0.2.4 you need to use SuggestionResult class

please check this

Code:
//create result Item
SuggestionResult suggestionResult = new SuggestionResult();
suggestionResult.Items = items.ToArray();
suggestionResult.Header = new BasicSuggestionTemplate("Please select your county.");
suggestionResult.Footer = new BasicSuggestionTemplate("Powered by ConvincingMail");
return suggestionResult.ToJSON(tryValue);


This is how your server need to return results. If you don't need Header and footer don't add them in control declaration on the aspx page.

Thanks
Mikhail
toologic
Posted: Sunday, January 31, 2010 11:38:32 AM
Rank: Member
Groups: Member

Joined: 1/27/2010
Posts: 11
Points: 33
Location: Russia, Moscow
Thanks. Please, you must correct sample code for another users, who used 2.0.2.4 (.NET 2.0) version your very good library!
toologic
Posted: Tuesday, February 16, 2010 2:33:22 PM
Rank: Member
Groups: Member

Joined: 1/27/2010
Posts: 11
Points: 33
Location: Russia, Moscow
Hello, trooper!

I have a next portion of problems.

I insert your control in test site. But i have a flow (a few times) error in IE7 (not in FF, Chrome etc) - Internet Explorer Cannot Open the Internet Site- Operation Aborted.

If I comment (close) code of your control - this error not occur. I think that the reason lies in the js code of your control. Can you help me?

Please see at test.stodorog.ru/guide/events - your control insert in central block under link called страны(countries)
toologic
Posted: Thursday, February 18, 2010 12:37:10 AM
Rank: Member
Groups: Member

Joined: 1/27/2010
Posts: 11
Points: 33
Location: Russia, Moscow
After initialize Autosuggestion control, all later javascript operation like a document.write(....) lead to error "Internet Explorer Cannot Open the Internet Site- Operation Aborted.
"

What you think about?
trooper
Posted: Sunday, February 21, 2010 8:32:23 PM
Rank: Administration
Groups: Administration

Joined: 11/18/2007
Posts: 80
Points: 152
Hi,
The control doesn't appear at all. Mybe you can create a simplified page to test?

Thanks
Mikhail
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.

Main Forum RSS : RSS

Powered by Yet Another Forum.net version 1.9.1.8 (NET v2.0) - 3/29/2008
Copyright © 2003-2008 Yet Another Forum.net. All rights reserved.
This page was generated in 0.145 seconds.