Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0AJAX Development using DNNAJAX Development using DNN
Previous
 
Next
New Post
3/3/2007 6:53 AM
 

I must admit I didn't even think about it so I don't have anything like that.

Maybe someone from the community who has tried it will chime in.

Btw. How come that you are still using dnn 2.0?

 


Thanks,
Vladan Strigo
NETMedia

My website: Vladan.Strigo.NET

Vladan.Strigo.NET: Projects
* Advanced VS2005 development approach - BlankModule
* DNN & Microsoft Ajax best practices guidance

Vladan.Strigo.NET: Resources
* Comprehensive list of DNN 4 Module development resources

 
New Post
3/3/2007 3:25 PM
 

HisKid wrote
Thanks for the responses. I have implemented Vladan's tutorial prior to this post. Unfortunately, I am unable to perform some rather simple tasks. (Vladan - Thank you for your most excellent work!) Ok here is my dilemma, I am trying to use an AutoCompleteExtender to run a webservice that returns user names from the DNN database for populating a textbox. Yes, VERY much like the ATLAS demo.

Here is my ASP code (Removed angle brackets so the post would work):

asp:ScriptManagerProxy ID="ScriptManagerProxy" runat="server"
Services
asp:ServiceReference Path="Service.asmxFileHere"/
/Services
/asp:ScriptManagerProxy
asp:TextBox id="txtUserName" runat="server"/
div id="AutoCompleteDiv" runat="server" /div
ajax:textboxwatermarkextender id="tweUserName" runat="server" targetcontrolid="txtUserName" watermarktext="Search for User by Name"/
ajax:autocompleteextender id="aceUserNames" runat="server" targetcontrolid="txtUserName" completionsetcount="1" completioninterval="1" completionlistelementid="AutoCompleteDiv" servicepath="Service.asmxFileHere" servicemethod="ServiceMethodNameHere" minimumprefixlength="1" /

: End Code

The service works when using the browser "~/DesktopModules/ModuleName/Service.asmxFileHere". The TextBoxWatermarkExtender works like a charm too. The problem is that my service doesn't fire and I am not sure why or how to go about debugging this kind of scenario since there is no code to follow. Please HELP me if you can.

Cheers!

As Vladan mentioned, if you want to directly call web services from your client, you need to add the ScriptService() attribute.  If you go to asp.net and Click on 'Learn', and go to the AJAX tutorials, you will find a video that explains exactly how to add the attribute to your web service.

Personally, I would never expose a web service directly from a client.  Instead I would recommend you call a server class, which manages interfaces to your web services.  But if you want to do it, it's explained in the video I mention above.

 
New Post
3/4/2007 9:06 AM
 

I also have divided opinions on calling web services from client... mainly from the security point of view (exposing the business logic on the client).

Although if you secure the entry points to the web service (input params to each function are checked and cleaned) you shouldn't have any problems - but you never know.

It would be interesting to hear the opinions of the Core team's security guys?

 


Thanks,
Vladan Strigo
NETMedia

My website: Vladan.Strigo.NET

Vladan.Strigo.NET: Projects
* Advanced VS2005 development approach - BlankModule
* DNN & Microsoft Ajax best practices guidance

Vladan.Strigo.NET: Resources
* Comprehensive list of DNN 4 Module development resources

 
New Post
3/5/2007 8:53 AM
 
Hey everyone,

Thanks for the updates. Security is not a consern as this is an intranet and I am authenticating the user against the Active Directory prior to executing the stored procedure within my web method.

Update - I got it all working. Vladan, I want you to know how much I appreciate all your help. Your email ended up putting me on the right track, but it did take me some time to figure out what was happening because my work laptop crashed and my IT dept. had to rebuild my rig. Anyway, I found out the painful way that the WebService and WebMethod can be named anything you want. In the AjaxControlToolkit; however, the arguments must be named exactly what the ASP.NET team uses in their examples.

In the case of the AutoCompleteExtender one must use :

[WebMethod] public string[] AnyNameYouWant(string prefixText, int count) {

// Your DB code here. You must declare the arguments above exactly as they are, whether you use them or not
// in order for this web method to be invoked.

}

I personally copied the Private Members, Constructor, Properties, and Private Methods from my SqlDataProvider class into my web service so I could connect to the database from within the DNN framework.

My config includes :
ASP.NET's AjaxControlToolkit
Microsoft's AJAX 1.0 Release
and Vladan's most exellent work posted in this thread!

For those who doubt this stuff works (for whatever reason), I can tell you that if you stick to the basics, and watch your naming conventions, Ajax will work in DNN provided you follow Vladan's directions to the T.

Cheers!

Cheers!
John Valentine
http://www.webinnovationsystems.com
 
New Post
3/5/2007 2:26 PM
 

Thanks HisKid,

I am really glad you made it working

 


Thanks,
Vladan Strigo
NETMedia

My website: Vladan.Strigo.NET

Vladan.Strigo.NET: Projects
* Advanced VS2005 development approach - BlankModule
* DNN & Microsoft Ajax best practices guidance

Vladan.Strigo.NET: Resources
* Comprehensive list of DNN 4 Module development resources

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0AJAX Development using DNNAJAX Development using DNN


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out