| |
|
|
akourkoumelis
: On
March 07, 2008 5:32 PM
said:
|
Hi, Can I invoke server side calls from javascript without invoking a web service?
|
|
|
|
JoeStagner
: On
March 15, 2008 12:48 PM
said:
|
Sure - you can use GET and OST directly.
|
|
|
|
ShijuKadamala
: On
March 27, 2008 10:35 AM
said:
|
When you are calling web service class from JavaScript, remember to call with full qualifier for the web service class.
|
|
|
|
darthocellaris
: On
March 28, 2008 12:12 PM
said:
|
my javascript is weak so correct me here. You misspelled 'return' in the script and the popup still shows. There is an error on the page still though. How is this possible? I would have expected no popup.
|
|
|
|
eunicep
: On
April 07, 2008 12:42 AM
said:
|
darthocellaris: I had the same problem encountering javascript error stating 'SimpleService' is undefined. I figured out that a namespace is needed. Here, the namespace I used is AJAXEnabledWebSite1. ret = AJAXEnabledWebSite1.SimpleService.SayHello(document.getElem entById('Text1').value, OnComplete, OnTimeOut, OnError);
|
|
|
|
JoeStagner
: On
April 14, 2008 8:55 PM
said:
|
darth.... browsers handle JS errors differently but often try to keep going, especially if you have client errors turned off in the browser.
|
|
|
|
anat2403
: On
April 20, 2008 1:35 PM
said:
|
Suppose the Name entered is 'Anat' and I want to keep this value in a session field or somewhwere in the server. How can I use the web service to get this value? Thankyou Anat
|
|
|
|
DarkKnight671
: On
April 23, 2008 7:50 AM
said:
|
Anat raises an interesting point - is there a way to sync server-controls with what gets changed as a result of the callback? I.E. - if we change a list of values (say, a dropdownlist), viewstate is not updated on the server and any selections may no longer be valid...
|
|
|
|
gladston_raj
: On
May 27, 2008 7:54 AM
said:
|
When i try to return a data table from the web service it is throwing a error "A circular reference has been detected while serializing an object of type 'System.Reflection.Module' ", why this error is comming and how can i over come this error
|
|
|
|
JoeStagner
: On
May 27, 2008 1:42 PM
said:
|
You can't automagically pass all server side objects to your client side code. Try manually serializing your Table to JSON or POX and then you can process the data sumply in your clint side Javascript code.
|
|
|
|
hasan_houshmand
: On
June 01, 2008 11:29 AM
said:
|
Hi Sir! I'm from Iran. As you see my name is hasan. These Videos are really helpfull. Special Thanks to you. But Ineed Your Help because really i want to learn AJAX. When i need your help, Do you help me?
|
|
|
|
ITSASPDOTNET
: On
June 24, 2008 9:34 PM
said:
|
JoeStagner, you have mentioned that we have to use GET and POST directly, to invoke invoke server side calls from javascript without invoking a web service. Do you have any sample for this? or can you please let me know in detail how can I achieve this? I would like to use it.
|
|
|
|
Sarkie
: On
July 01, 2008 5:53 AM
said:
|
In 3.5 or 2008 it shows for the var ret = SimpleService.SayHello(document.getElementById('Text1').val ue, OnSuccess,OnFailure, "UserContextDataHere"); Only OnSuccess and OnFailure, no OnTimeout and allows UserContext data being sent around etc. This correct? Sarkie
|
|
|
|
JoeStagner
: On
July 15, 2008 8:28 AM
said:
|
Sarkie - that's correct. If the error is a time-out the error message will contain that data,
|
|
|
|
claooigt
: On
July 16, 2008 5:27 AM
said:
|
Great show case... Questions: If my business logic need to wait until server callback complete before I can proceed to the next line of code, how I can do it? Any sample? For example, before save a record, I validate on duplicate entry against database records. If web method return "0", then only I proceed with the next validation. Please advise. Thanks!
|
|
|
|
toakes
: On
July 28, 2008 9:44 PM
said:
|
I'm having the same error that eunicep was having - a Javascript error that states that the service name is undefined. I'm not sure where to find the namespace for the site? Can anyone point me in the right direction? Thanks!
|
|
|
|
toakes
: On
July 28, 2008 10:45 PM
said:
|
I solved my problem by registering the web service in VS.
|
|
|
|
new_to_ajax
: On
August 01, 2008 3:40 PM
said:
|
Hi Joe, How can I call server side method (public method in codebehind class) from javascript similar to the call that you made to web service? Thanks, -Asif
|
|
|
|
cv_vikram
: On
August 06, 2008 1:26 PM
said:
|
It is simple and good....
|
|
|
|
sonalbagdiya
: On
August 06, 2008 5:30 PM
said:
|
Hi Asif, You can call server side method by calling onserverclick=method() on html button in source rather than calling onclick for html button. Thanks
|
|
|
|
liujack123@hotmail.com
: On
August 18, 2008 11:12 PM
said:
|
hello I followed the vedio and do what he did in the vedio,then run the website,and i click the button,but no popup .there is nothing while I am clicking,what happened? could any one tell me about it .thank u
|
|
|
|
S.Pirashanth
: On
August 28, 2008 6:56 AM
said:
|
Many thanks Joe for the excellent video series
|
|
|
|
nolazabal
: On
September 18, 2008 5:58 PM
said:
|
Hello Joe, I would be interested to know if the same calls you made in this example in an aspx page can be made from a simple html page. The reason is that I have some existing web services I would like to use on some old html pages.
|
|
|
|
nsuresh_rasr
: On
September 25, 2008 11:32 AM
said:
|
very good article... really helpful....
|
|
|
|
emre.kocyigit
: On
October 07, 2008 7:51 PM
said:
|
I appreciate these series a lot htnak you! May I ask you sth tough .. which server side types are ready to go for this and which need to be manually serialized? string and int only I suppose .. you know web is big .. its easy just to pop up a question here .. you know the best programmer is the lazy one :) cheers!
|
|
|
|
Demien
: On
October 16, 2008 9:32 AM
said:
|
Thanks for videos! I've got a question: is there any way to call client javascript after UpdatePanel postback is done?
|
|
|
|
|
|
tajenli
: On
November 06, 2008 7:58 PM
said:
|
I open your sample project as a Web Site in VB 2008. Everything works fine. But when I import the 2 items .aspx & .asmx into an ASP.NET web application. I keep getting "SimpleService" is undefined error. What I need to do to fix this problem for it to run under ASP.NET web application? Thanks
|
|
|
|
saqib_dotnet
: On
November 20, 2008 4:20 PM
said:
|
I m also getting the same error that SimpleService is undefined. The application compile fines. No issues with references but fails when click on button to invoke service.
|
|
|
|
philayton
: On
November 21, 2008 5:22 AM
said:
|
Joe I've been using your technique for over a year now and just moved to VS 2008. I tried the same technique and got the service is undefined error in Javascript. I noticed when creating the web service under 2008 it didn't add the simpleservice.cs file to the App_Code as it does in 2005. I manually created an App_Code folder, moved the SimpleService.cs file into it (can't do this in VS, use file manager) and edited the .aspx file to have one line, thus: <%@ WebService Language="C#" CodeBehind="~/App_Code/SimpleService.cs" Class="SimpleService" %> And all works! In a nutshell if you want this to work, do it in VS 2005, test and then upgrade to 2008 and all is well. Looks like a bug in the web service creation process in VS 2008. I would be really interested to know it this is the case.
|
|
|
|
serbet
: On
February 24, 2009 2:55 AM
said:
|
very good thanks! Joe done well!
|
|
|
|
ericnickus2
: On
March 15, 2009 4:44 AM
said:
|
I would have saved a lot of hassle if I would have looked at your video first before trying all the other 'examples' out there. Nice job, you got me started only, but in the right direction. However, the VB gave me an error in the SimpleService.vb in the App_Code folder on this line: <System.Web.Script.Services.ScriptService()> _ why? even though I prefer C#, I want to know. But the C# works fine if I upgrade to 3.5 thanks.
|
|
|
|
einarabelc5
: On
April 12, 2009 7:36 PM
said:
|
Hello Sir, Its Cool to see how you explain this so elegantly. Anyways you might want to check the retunr(true) typo on your Javascript button clic event handler.
|
|
|
|
archirex
: On
May 01, 2009 4:30 PM
said:
|
Hi, I have been using this for some small pages for a while thanks to your video and it works very quickly. However, I've come across a method I had to make that is slow (gathering records) and I need to adjust the timeout. I've found other pages that mention httpRuntime executionTimeout="seconds" in the Maching or Web.config, but that didn't do anything for me with this set up of a ScriptService called from js rather than a normal WebService(http://www.dotnet247.com/247reference/msgs/35/177105.aspx). Does anyone know how to set OnTimeOut to wait longer?
|
|
|
|
haithemara
: On
May 03, 2009 10:50 AM
said:
|
Thank you for the video Joe. I has some error when i changed the ret name to retrieved value.So, is there any way we can see the different functions syntax in System.Web.Script.Services.ScriptService Thank you.
|
|
|
|
sansinfo2008
: On
May 13, 2009 2:55 PM
said:
|
|
Thanks Joe for this video
|
|
|
|
harieis
: On
May 27, 2009 4:11 AM
said:
|
Thanks Joe..Its very nice..coool hari(eis-trivandrum)
|
|
|
|
abelanet
: On
May 27, 2009 12:19 PM
said:
|
Thanks, lately I need this
|
|
|
|
luismmr_cu
: On
June 12, 2009 7:21 AM
said:
|
hi Joe, thanks for your videos, they are very helpful. I had a question: On this example when you run it you have a javascript error, I can see it on then status bar. If you had turned on alerts you'd had an error popup. Have you checked that?
|
|
|
|
yogisat
: On
June 26, 2009 5:55 PM
said:
|
|
|
|
|
|
k_s18
: On
June 27, 2009 4:05 PM
said:
|
Hi Joe, Thanks for the video. I am getting an error...."SimpleService is undefined" Plz resolve this.
|
|
|
|
PapillonUK
: On
July 13, 2009 10:31 AM
said:
|
Great video. Note to other users though - there is no OnTimeOut functionality. The call to the web service just has OnSuccess and OnError. In your OnError function, you can use alert(arg.get_message()); to display the error message. Joe - I wasted a good hour working through that piece of misinformation! Perhaps put up a corrected video?
|
|
|
|
|
|
davidhaymond
: On
August 11, 2009 9:30 PM
said:
|
darthocellaris: The reason the misspelled JavaScript return statement didn't cause the web service to fail is because the return statement is not related to the asynchronous service call. (In fact, the return statement could have been omitted without messing up the service.) The service call occurs BEFORE the misspelled return and is therefore executed correctly.
|
|
|
|
yfondeur
: On
September 04, 2009 8:38 PM
said:
|
|
|
|
|
|
atarikg
: On
September 26, 2009 11:47 PM
said:
|
Well, there was an error occurred tho :) thanks for the video. Taught me a lot.
|
|
|
|
5imian
: On
September 27, 2009 9:22 AM
said:
|
|
|
|
|
|
mxc100
: On
October 15, 2009 8:55 PM
said:
|
I follow the vedio with VB 2008 and VB2005. Both keep getting error: SimpleService is undefined. I tried put the SimpleService.vb file into App_Code. still get same error.
|
|
|
|
lohith.bn
: On
October 21, 2009 11:35 AM
said:
|
|
|
|
|
|
ramesh866
: On
October 25, 2009 2:58 PM
said:
|
how about coding using c#?
|
|