Showing posts with label autocompleteextender. Show all posts
Showing posts with label autocompleteextender. Show all posts

Wednesday, March 28, 2012

Accessing profile info from Webservice

This is the situation I'm facing: I have a AutoCompleteExtender which fetches data based upon the information stored in Profile fields. When I write the code for the webservice connected to the Extender, I cannot access the data in asp.net's User Profiles. I have a suspicion this is because a web service is not really part of the website, but rather a standalone application.

Is there a way to use the Profile information in a web service?Nobody out there with an answer?
If the web services are part of the app, then there shouldn't be any domain access issues. Can you copy up your code?
I found out how to do it: apparently one needs to access the httpcontext in order to retrieve the Profile information:

Context.Profile["group.name"].ToString()

thank you for posting this!

i've been looking everywhere for such information, and even wrote a post on this board half hour ago after google groups search, but than came across your post and i will be able to sleep tonight.

thanks again!

Monday, March 26, 2012

Access Method

Hello,

I am defining and adding a AutoCompleteExtender to a page at runtime but I am getting an error when defining:

MyAutoComplete.ServiceMethod ="GetCompletionList"

The "GetCompletionList" is a method inside the AutoComplete.asmx file.

What do I need to do so it become available?

Thanks,

Miguel

Miguel,

Where does the ASMX file reside? Do you have it referenced in your script manager section?

Please post your code. It should help narrow down the issue.

Tim


Hello,

I just added the asmx file using the VS menu so the .asmx file was placed on the root of my web site and the correspondent .vb file was placed in App_Code.

Is this what I should do?

Then I also added the following code line on MyPage.vb Init event:

MyScriptManager.Services.Add(New ServiceReference("AutoComplete.asmx"))

Thanks,

Miguel


Hi Miguel,

You need to specify the service path as well.

MyAutoComplete.ServicePath="AutoCompleteExtender.asmx" 

Wednesday, March 21, 2012

A problem with AutoCompleteExtender with Digital String.

I got a problem with AutoCompleteExtender.

If I had made the result of Web Service Method with Digital characters only , without any letter. I got the promotion list with "undefined".

That means I made the Web Service Method as body below, the web page is going to represent as three "undefined".

[WebMethod]
[System.Web.Script.Services.ScriptMethod]
public string[] GetCompletionList(string prefixText, int count)
{
string[] result = new string[3];
result[0] = "123";
result[1] = "456";
result[2] = "789";
return result;
}

I can not found a solution with it, if anyone know how to solve this problem please let me know.

Thank you very much.

Does anybody know its solution?


Hi Leiyangcl,

It is a known issue and has been fixed in the latest Version. Please reference tothis. So you should upgrade your AJAX Control Toolkit to the latest version V11119.

Best regards,

Jonathan


Many thanks Jonathan I am going to download this version.

BTW, your name is looks like a Chinese, if so, welcome you to visit my Chinese ASP.net AJAX websitewww.ajaxasp.net.cn

And I am welcome for any professional suggestion from you.

Thank you very much.

Yang.Lei

A more advanced AutoCompleteExtender?

I've been playing around with the AutoCompleteExtender and it's pretty easy to use. Is there anyway to better control when to call the webservice? For instance, right now it calls the webservice after the 3rd character of a textbox is typed in. What happens if i want the webservice called on the first or second character is type in? Is this possible?Hi,

yes it is, but you have to modify the Extender control. Checkthis article from my blog.
Ah, extending the control. Thanks, and good tips on your blog too. Subscribed.

Looks like the MarchCTP bits has a MinimumPrefixLength property for the AutoCompleteProperties class. So no need to modify the Extender control anymore.Cool [cool]

AutoCompleteProperties MinimumPrefixLength Property