I have made the WebService and acessing its method using AutoCompletion Server control. Is there any way to pass more arguments other than prefixText and
count.
In my case:
i've to retrive from webvservice a list of strings filtered by a value selected by a DropDownList in page.
So for example my functions sounds like this:
GetStrings(string Prefix, int count, string MyFilter);
where MyFilter is the text get it from droplist
Any clue or workaround?
I want to pass the role type of the user logged into my application. In the web service method, this role type will be manipulated and only data accessible to that role type will be displayed.
If there is some other method to achieve this in Atlas, then do tell me.
i found a solution to at problem, but i've to changed code in Atlas.js and create a custom AutoCompleteExtender and a custom AutoCompleteProperties.
In few words:
- added a variable for my paramenter in 'Web.Net.ServiceMethodRequest.callMethod';
- added a parameter to 'Web.Net.ServiceMethodRequest.callMethod' in Atals.js row 6409 for my variable;
- build two custom classes derived from AutoCompleteExtender and AutoCompleteProperties to implement my variable, so now my code asp.net code is:
<myatlas:MyAutoCompleteExtender
ID="myAutoComplete"
runat="server">
<myatlas:MyAutoCompleteProperties
TargetControlID="myTextBox"
ServicePath="webservices/MyAutoCompleteService.asmx"
ServiceMethod="GetStreets"
MinimumPrefixLength="2"
MyParameter="Rome"
Enabled="true"
/>
</myatlas:MyAutoCompleteExtender>
Now i need to get the value from a dropdownlist so on 'SelectedIndexChanged':
Unfortunately I do not have a solution too but a big need for this functionality.
I cannot understand that the designed of this Atlas Control choosed a delegate Method.
It is not naturally to auto complete static data but much more likely to autocomplete dynamic generated data based on multiple Parameters.
Well - I would be very glad if someone can give me a hint which Atlas or other Webframework Control support autocompletion by calling a Webservice with multiple Parameters.
no, it's not possible because it acts as a delegate method, so it must have a unique signature. Which are your requirements?
It's possible some way, there is an optional third parameter contextKey (AutoComplete).
In the beginning we haven't got this parameter, in that era I simply used the count as an integer contextkey, it worked for me in some special cases [:)]
Mansimran
Member
40 Points
8 Posts
Multiple parameters in AutoCompletion Server control
Mar 17, 2006 07:55 AM|LINK
I have made the WebService and acessing its method using AutoCompletion Server control. Is there any way to pass more arguments other than prefixText and count.
public
string[] GetData(string prefixText, int count){
//code goes here......
}
Garbin
Contributor
7428 Points
1507 Posts
ASPInsiders
Re: Multiple parameters in AutoCompletion Server control
Mar 17, 2006 09:06 AM|LINK
no, it's not possible because it acts as a delegate method, so it must have a unique signature. Which are your requirements?
crino
Member
70 Points
15 Posts
Re: Multiple parameters in AutoCompletion Server control
Mar 17, 2006 09:44 AM|LINK
i need to this feature too.
In my case:
i've to retrive from webvservice a list of strings filtered by a value selected by a DropDownList in page.
So for example my functions sounds like this:
GetStrings(string Prefix, int count, string MyFilter);
where MyFilter is the text get it from droplist
Any clue or workaround?
TIA
Mansimran
Member
40 Points
8 Posts
Re: Multiple parameters in AutoCompletion Server control
Mar 17, 2006 10:12 AM|LINK
I want to pass the role type of the user logged into my application. In the web service method, this role type will be manipulated and only data accessible to that role type will be displayed.
If there is some other method to achieve this in Atlas, then do tell me.
andersb79
Member
50 Points
10 Posts
Re: Multiple parameters in AutoCompletion Server control
Mar 17, 2006 08:33 PM|LINK
I also want this function.
I want to send in an ID soo that I can get the right list.
crino
Member
70 Points
15 Posts
Re: Multiple parameters in AutoCompletion Server control
Mar 18, 2006 03:25 PM|LINK
i found a solution to at problem, but i've to changed code in Atlas.js and create a custom AutoCompleteExtender and a custom AutoCompleteProperties.
In few words:
- added a variable for my paramenter in 'Web.Net.ServiceMethodRequest.callMethod';
- added a parameter to 'Web.Net.ServiceMethodRequest.callMethod' in Atals.js row 6409 for my variable;
- build two custom classes derived from AutoCompleteExtender and AutoCompleteProperties to implement my variable, so now my code asp.net code is:
<myatlas:MyAutoCompleteExtender ID="myAutoComplete" runat="server">
<myatlas:MyAutoCompleteProperties
TargetControlID="myTextBox"
ServicePath="webservices/MyAutoCompleteService.asmx"
ServiceMethod="GetStreets"
MinimumPrefixLength="2"
MyParameter="Rome"
Enabled="true" />
</myatlas:MyAutoCompleteExtender>
Now i need to get the value from a dropdownlist so on 'SelectedIndexChanged':
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e){
((MyAutoCompleteProperties)myAutoComplete.TargetProperties[0]).MyParameter = DropDownList1.SelectedItem.Text;
}
And works!
If anyone have other idea....is welcome!! :)
feelx
Member
10 Points
2 Posts
Re: Multiple parameters in AutoCompletion Server control
May 14, 2006 03:15 PM|LINK
Unfortunately I do not have a solution too but a big need for this functionality.
I cannot understand that the designed of this Atlas Control choosed a delegate Method.
It is not naturally to auto complete static data but much more likely to autocomplete dynamic generated data based on multiple Parameters.
Well - I would be very glad if someone can give me a hint which Atlas or other Webframework Control support autocompletion by calling a Webservice with multiple Parameters.
still in hope for a solution
feelx
feelx
Member
10 Points
2 Posts
Re: Multiple parameters in AutoCompletion Server control
May 15, 2006 07:21 PM|LINK
well for the other peoples interest I found a very nice Ajax.Net Framework that beats at the time Atlas low functionality and efficency.
chech out http://www.ajaxpro.info/
cheers felix
anzer
Star
7928 Points
1506 Posts
Re: Multiple parameters in AutoCompletion Server control
Apr 28, 2008 06:30 AM|LINK
using ContextKey can help to solve the problem to some extend
See this article
http://www.aspdotnetcodes.com/AutoComplete_Textbox_Addtional_Parameters.aspx
ClientSideAsp.Net | Blog
stmarti
Contributor
4963 Points
1036 Posts
Re: Multiple parameters in AutoCompletion Server control
Apr 28, 2008 08:26 AM|LINK
It's possible some way, there is an optional third parameter contextKey (AutoComplete).
In the beginning we haven't got this parameter, in that era I simply used the count as an integer contextkey, it worked for me in some special cases [:)]